UnityPlatformer.CharacterHealth.Heal C# (CSharp) 메소드

Heal() 공개 메소드

increse health character if possible maxHealth not reached. Trigger onMaxHealth
public Heal ( int amount = 1 ) : void
amount int
리턴 void
    public void Heal(int amount = 1) {
      health += amount;
      if (onHeal != null) {
        onHeal();
      }

      if (maxHealth != -1 && health >= maxHealth) {
        health = maxHealth;
        if (onMaxHealth != null) {
          onMaxHealth();
        }
      }
    }
    /// <summary>