Ejemplo n.º 1
0
    public void Damage(int damage)
    {
        health -= damage;

        PopUpTextManager.SpawnPopUpText(damage.ToString(), transform.position, PopColor.red);

        if (health <= 0)
        {
            Die();
        }
    }
Ejemplo n.º 2
0
    public void Heal(int heal)
    {
        health += heal;

        PopUpTextManager.SpawnPopUpText(heal.ToString(), transform.position, PopColor.green);
    }