예제 #1
0
        public void AddScore(int scoreToAdd)
        {
            if (isGameOver)
            {
                return;
            }
            score += scoreToAdd;

            //Call subscribers
            scoreAdded.Invoke(score);
        }
예제 #2
0
        public void AddScore(int scoreToAdd)
        {
            if (isGameOver)
            {
                return;
            }

            score += scoreToAdd;

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

            // Call subscribers
            scoreAdded.Invoke(score);
        }