IEnumerator DelayEnd() { yield return(new WaitForEndOfFrame()); lev.setInputEnable(false); yield return(new WaitForSeconds(14)); //SHOULD NOT RESET ALL!! GameDataManager.shared().Reset(); //SHOULD NOT RESET ALL!! GameDataManager.shared().LOCAL_IsLoadOpening = true; print(GameDataManager.shared().MyuuJournalState.ToString()); if (GameDataManager.shared().MyuuJournalState == MyuuJournalState.None) { GameDataManager.shared().MyuuJournalState = MyuuJournalState.First; GameDataManager.shared().Save(GameDataManager.GameDataType.MyuuData); } GameDataManager.shared().SaveGameExist = false; GameDataManager.shared().PlayerLocation = new LocationModel(nextScene, LocationType.Start); SceneManager.LoadScene(nextScene); MainObjectSingleton.DestoryAllInstance(); }
void HandleOnFadeOutCompleted() { fader.OnFadeOutCompleted -= HandleOnFadeOutCompleted; // MainObjectSingleton.DestoryAllInstance(); //load scene // SceneManager.LoadScene (GameDataManager.shared().PlayerLocation.sceneName); SceneManager.LoadScene(GameDataManager.shared().PlayerLocation.sceneName); }
void Fader_OnFadeOutCompleted() { fader.OnFadeOutCompleted -= Fader_OnFadeOutCompleted; //destroy all dont destroy onload MainObjectSingleton.DestoryAllInstance(); GameDataManager.shared().PlayerLocation = portalTo; SceneManager.LoadScene(portalTo.sceneName); // GameDataManager.shared ().NextSceneFromLoadScreen = portalTo.sceneName; // SceneManager.LoadScene ("LoadingScreen"); }
void HandlePausedMenuMainMenu() { ClearEvents(); Time.timeScale = 1f; MainObjectSingleton.DestoryAllInstance(); }
void Fader_OnFadeOutCompleted() { fader.OnFadeOutCompleted -= Fader_OnFadeOutCompleted; op.allowSceneActivation = true; MainObjectSingleton.DestoryAllInstance(); }
void HandleOpeningMenuStartingNewGame() { ClearEvents(); GUIMenu.shared().isIdle = true; MainObjectSingleton.DestoryAllInstance(); }