1
Fork 0
slime-blood-and-pain/Assets/Scripts/Consumabile.cs
Lorenzo Balugani 32c2382e06 Add a massive mess
Bunch of unfinished code
2019-04-27 17:18:44 +02:00

32 lines
649 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Consumabile : Object
{
// Start is called before the first frame update
public enum Tipo {Cura, Danno};
public GameObject player;
public Player player;
public int valore;
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void use(){
if (Tipo == Tipo.Cura){
player.hp += valore;
if (player.hp >= player.maxhp) player.hp = player.maxhp;
}
if (Tipo == Tipo.Danno){
player.hp -= valore;
}
}
}