public void Heal(int healAmount, MonoX healer) { currentAmount += healAmount; if (currentAmount > maxAmount) { currentAmount = maxAmount; } if (Healed != null) { Healed(healer, this); } }
public void Damage(int damageAmount, MonoX adversary) { if (!IsDead) { if (currentAmount - damageAmount <= 0) { Deplete(adversary); } else { currentAmount -= damageAmount; if (Damaged != null) { Damaged(adversary, this); } } } }
public void Deplete(MonoX adversary) { currentAmount = 0; if (Depleted != null) { Depleted(adversary, this); } }