Exemplo n.º 1
0
        IEnumerator EndLevel()
        {
            if (LevelSystem.Instance.GameIsOver())
            {
                SetGameState(GameState.End);
                gameScreenLogger.Show_GameOverTitle();
                yield return(Pause.Brief());

                Score.Reset();
                RemoveRemainingGameTokens();
                gameScreenLogger.Clear_Text();
                DefineNewGame();
            }
            else
            {
                gameScreenLogger.Show_LevelCleanedTitle();
                yield return(Pause.Brief());

                LevelSystem.Instance.AddLevel();
            }

            yield return(Pause.Long());
        }