public IEnumerator ChangeMicroGame()
    {
        int currentScene = SceneManager.GetActiveScene().buildIndex;

        int microgameToLoad = availableMicroGames[UnityEngine.Random.Range(0, availableMicroGames.Count)];

        //precaution, if the microgame is the same, try again
        if (microgameToLoad == currentScene)
        {
            microgameToLoad = availableMicroGames[UnityEngine.Random.Range(0, availableMicroGames.Count)];
        }

        yield return(transitionDelay);

        if (MetaGameManager.IsGameOver)
        {
            MetaGameManager.GameOver();
        }
        else
        {
            SceneManager.LoadScene(microgameToLoad);
        }
        yield return(transitionDelay);
    }
Пример #2
0
 public void ReturnToMain(string TitleSceenScene)
 {
     //SceneManager.LoadScene(TitleSceenScene);
     //DestroyMetaGameObjects();
     MetaGameManager.GameOver();
 }