public void Heal(Hearts amount) { if (!enabled) { return; } ActualHp += amount; ActualHp = Hearts.Clamp(ActualHp, 0, maxHearts.Value); if (onHealed != null) { onHealed.Invoke(amount.TotalPoints); } }
void Clamp() { value = Hearts.Clamp(value, min, max); }