Esempio n. 1
0
 public void ConsumeEnegy(float amount)
 {
     currentMP -= amount;
     if (enegyBarUI)
     {
         enegyBarUI.UpdateTakeDamageHP(amount);
     }
 }
Esempio n. 2
0
    public override void TakeDamage(float damage)
    {
        currentHP -= damage;
        hpBarUI.UpdateTakeDamageHP(damage);

        if (currentHP <= 0f)
        {
            currentHP = 0f;
            Die();
        }
    }