1
Fork 0
slime-blood-and-pain/Assets/Scripts/Consumabile.cs

34 lines
654 B
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
2019-04-27 15:28:38 +00:00
/*
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;
}
}
}
2019-04-27 15:28:38 +00:00
*/