Exemple #1
0
    private void Awake()
    {
        scoreKeeper   = FindObjectOfType <ScoreKeeper>();
        mySceneLoader = FindObjectOfType <MySceneLoader>();

        currentScene = mySceneLoader.GetCurrentSceneName();

        DetectAndSetNewGame();
        PickRandomGameOrGoToRestart();
    }
Exemple #2
0
    private void PickRandomGameOrGoToRestart()
    {
        var currentScene = mySceneLoader.GetCurrentSceneName();

        if (currentScene.Equals("GameLobby"))
        {
            var currentLives = scoreKeeper.GetCurrentLives();

            if (currentLives > 0)
            {
                mySceneLoader.GetRandomGame_Delay();
            }
            else
            {
                mySceneLoader.GoToRestart_Delay();
            }
        }
    }
Exemple #3
0
    private void Awake()
    {
        scoreKeeper   = FindObjectOfType <ScoreKeeper>();
        mySceneLoader = FindObjectOfType <MySceneLoader>();

        var currentScene = mySceneLoader.GetCurrentSceneName();

        if (currentScene.Equals("GameLobby"))
        {
            var currentLives = scoreKeeper.GetCurrentLives();

            if (currentLives > 0)
            {
                mySceneLoader.GetRandomGame_Delay();
            }
            else
            {
                mySceneLoader.GoToRestart_Delay();
            }
        }
    }