private void OnClicked() { _currentScore++; _clickerGameView.ShowScore(_currentScore); Click?.Invoke(); ChangeScore?.Invoke(_currentScore); }
public void TakeDamage(float damage) { _health -= damage; OnPlayerHealthChangedEvent?.Invoke(_health / _maxHealth); if (_health <= 0) { Died?.Invoke(gameObject); ChangeScore?.Invoke(); } }
public void SetScore(float score) { if (score >= 0) { _currentScore = score; ChangeScore?.Invoke(_currentScore); } else { new System.Exception("Score cannot be less zero"); } }
public void ChangeScoreAction(int value) { ChangeScore?.Invoke(value); }