private void IncreaseHealth(float amount) { _currentHealth = Mathf.Min(_currentHealth + amount, _maxHealth); if (_currentHealth < 0f) { OnCharacterDied?.Invoke(this); } }
public void CharacterDied() { OnCharacterDied?.Invoke(this, EventArgs.Empty); Debug.Log("charater died"); }
protected void Die() { OnCharacterDied?.Invoke(); }