예제 #1
0
 public void LoadScene(int sceneIndex)
 {
     if (SplashScreen.isFinished == true)  // to prevent accidental clicks
     {
         if (sceneIndex == 1)
         {
             if (GameController.gameController.userSettings.firstRun == true) // first time launch
             {
                 SceneManager.LoadScene(3);                                   // tutorial/cutscene
             }
             else  // display loading screen/ui.
             {
                 loadingScr.SetActive(true);
                 loading.LoadLvlStart();
             }
         }
         else if (sceneIndex == -1)  // exit button
         {
             Application.Quit();
         }
         else
         {
             UnityEngine.SceneManagement.SceneManager.LoadScene(sceneIndex);
         }
     }
 }
예제 #2
0
    public void SkipButton()
    {
        //.. cutscene over Save
        GameController.gameController.userSettings.firstRun = false;
        GameController.gameController.Save();

        // loading screen
        loadingScr.SetActive(true);
        loading.LoadLvlStart();
    }