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