public new void Construct(IScoreManager scoreManager) { _scoreManager = scoreManager; _scoreManager.ScoreChanged += OnScoreChanged; _text.text = _scoreManager.GetScore().ToString(); }
public void GameOver() { if (CurrenteStateName == GridStates.GameOver) { return; } if (_highScoreManager != null) { _highScoreManager.SetHighScore(_scoreManager.GetScore()); DisplayGameOverMessage(); } SetState(GridStates.GameOver); UnsubscribeInputEvents(); if (OnGameOverEvent != null) { OnGameOverEvent(this); } }