public void UsingMana(float manaUsed) { ResetWaitTime(); if (mana > 0) { mana -= manaUsed; manaBar.UpdateValue(mana, maxMana); } }
public void ApplyDamage(float totalDamage) { health -= totalDamage; healthBar.UpdateValue(health, maxHealth); if (health <= 0) { Kill(); } }
public void GainEnergy(float amount) { if (energy < 100) { energy += amount; energyBar.UpdateValue(energy, 100); } }
public void TakeDamage(float amount) { if (health <= 0f && !dying) { Die(); } else { health -= amount; healthBar.UpdateValue(health, maxHealth); } }