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); } } }
public void SkipButton() { //.. cutscene over Save GameController.gameController.userSettings.firstRun = false; GameController.gameController.Save(); // loading screen loadingScr.SetActive(true); loading.LoadLvlStart(); }