예제 #1
0
    private IEnumerator PauseGameRoutine(GameController gc)
    {
        gc.PauseGame(true);

        var doesUserWantToQuit = new ConfirmationContext();

        settingsPopup.ShowInGame(doesUserWantToQuit);

        while (!doesUserWantToQuit.IsFinished)
        {
            yield return(null);
        }

        if (doesUserWantToQuit.IsConfirmed)
        {
            gc.HandlePlayerQuit();
        }
        else
        {
            gc.PauseGame(false);
        }
    }