public void restoreHealth(int healthToAdd) { if (IsDead) { return; } _currentHealthSO.RestoreHealth(healthToAdd); if (_updateHealthEvent != null) { _updateHealthEvent.RaiseEvent(); } }
/// <summary> /// Used for cure events, like eating food. Triggered by an IntEventChannelSO. /// </summary> private void Cure(int healthToAdd) { if (IsDead) { return; } _currentHealthSO.RestoreHealth(healthToAdd); if (_updateHealthUI != null) { _updateHealthUI.RaiseEvent(); } }