[quote author=francoe1" data-ipsquote-contapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentclass="forums_Topic" data-ipsquote-contentid="15848" data-ipsquote-contentcommentid="100908">Vamos por paso.Debes crear un componente para la salud, llamemoslo HealtInfo vamos al código
public class HealtInfo : MonoBehaviour{
public int MaxHealt = 1;
public int MinHealt = 0;
private int CurrentHealt;
public int GetHealt{get{return CurrentHealt;}}
private bool Death;
public bool IsDeath{get{return Death;}}
public void ApplyDamage(int Value)
{
CurrentHealt -= Value;
HealtChange();
}
public void ApplyHealt(int Value)
{
CurrentHealt += Value;
HealtChange();