Пример #1
0
 public void RemoveHealthComponent(BaseHealth health)
 {
     _initialHeath -= health._initialHeath;
     _currentHealth = (currentHealth - health._initialHeath > 0)
         ? currentHealth - health._initialHeath
         : _currentHealth;
     HealthAdded?.Invoke(this, EventArgs.Empty);
 }
Пример #2
0
 public void AddHealthComponent(BaseHealth newHealth)
 {
     _initialHeath  += newHealth._initialHeath;
     _currentHealth += newHealth._initialHeath;
     HealthAdded?.Invoke(this, EventArgs.Empty);
 }