Пример #1
0
 public void TakeDamage(float damage)
 {
     _currentHealth -= damage;
     _entityHit?.Invoke();
     EntityHit?.Invoke();
     if (_currentHealth <= 0)
     {
         Die();
     }
 }
Пример #2
0
 protected void OnEntitityHit()
 {
     EntityHit?.Invoke(this.gameObject);
 }