public void AddScore(int scoreToAdd) { if (isGameOver) { return; } score += scoreToAdd; //Call subscribers scoreAdded.Invoke(score); }
public void AddScore(int scoreToAdd) { if (isGameOver) { return; } score += scoreToAdd; scoreAdded.Invoke(score); }
public void AddScore(int scoreToAdd) { // Is the game over? if (isGameOver) { // Exit the function. return; } // Add Score score += scoreToAdd; // Call subscribers scoreAdded.Invoke(score); }