public void TakeDamage(float damage) { _currentHealth -= damage; _entityHit?.Invoke(); EntityHit?.Invoke(); if (_currentHealth <= 0) { Die(); } }
protected void OnEntitityHit() { EntityHit?.Invoke(this.gameObject); }
public void TakeDamage(float damage) { _currentHealth -= damage; _entityHit?.Invoke(); EntityHit?.Invoke(); if (_currentHealth <= 0) { Die(); } }
protected void OnEntitityHit() { EntityHit?.Invoke(this.gameObject); }