public void ApplyDamage(int damage) { _helth -= damage; HelthChanged?.Invoke(_helth); if (_helth <= 0) { Die(); } }
public void ApplyDamage(int damage) { _currentHelth -= damage; HelthChanged?.Invoke(_currentHelth, _helth); if (_currentHelth <= 0) { Die(); _currentHelth = 0; } }
private void Start() { HelthChanged?.Invoke(_helth); }