コード例 #1
0
    public void Heal(int heal)
    {
        currentHealth += heal;

        if (currentHealth > maxHealth)
        {
            currentHealth = maxHealth;
        }
        OnHealEvent.Invoke(currentHealth, maxHealth);
    }
コード例 #2
0
 public void ResetHealth()
 {
     currentHealth = maxHealth;
     IsDeath       = false;
     OnHealEvent.Invoke(currentHealth, maxHealth);
 }