protected override void OnNewSceneReinitialize(EAppScene newScene, EAppScene lastScene) { base.OnNewSceneReinitialize(newScene, lastScene); FindPlayerSpawnPositionsInScene(); ReinitializeDictionaries(); }
protected override void OnNewSceneReinitialize(EAppScene newScene, EAppScene lastScene) { base.OnNewSceneReinitialize(newScene, lastScene); ReinitializeDebugTexts(); notifcationWindow = FindObjectOfType <NotifcationWindow>(); }
private void On_SceneLoaded(Scene newScene, LoadSceneMode loadSceneMode) { Debug.Log("Loading level done : " + newScene.name); BEventsCollection.APP_AppSceneUpdated.Invoke(new StateBEHandle <EAppScene>(CurrentLoadingAppScene, CurrentAppScene)); CurrentAppScene = CurrentLoadingAppScene; CurrentLoadingAppScene = EAppScene.NONE; }
private IEnumerator DelayedUpdateStateCoroutine(EAppScene newScene) { yield return(new WaitForEndOfFrame()); if (IS_KEY_CONTAINED(startStatesMap, newScene)) { UpdateState(startStatesMap[newScene]); } }
private void LoadScene(EAppScene sceneToLoad) { if (sceneBuildNamesMap.ContainsKey(sceneToLoad)) { SceneManager.LoadScene(sceneBuildNamesMap[sceneToLoad]); } else { LogConsoleError("No scene build name was specified for : " + sceneToLoad); } }
/// <summary> /// Start loading process of a new scene (or reload of current scene). /// </summary> public void UpdateScene(EAppScene newAppScene) { //if (newAppScene == CurrentAppScene) //{ // LogConsoleWarning("Reloading the same scene!"); // return; //} CurrentLoadingAppScene = newAppScene; BEventsCollection.APP_SceneWillChange.Invoke(new StateBEHandle <EAppScene>(newAppScene, CurrentAppScene)); // Wait some frames before changing scene StartCoroutine(LateUpdateSceneCoroutine(newAppScene)); }
private void On_APP_SceneChanged(StateBEHandle <EAppScene> eventHandle) { EAppScene scene = eventHandle.NewState; FindAndBindButtonActions(); //switch (scene) //{ // case EAppScene.MENU: // if (CurrentGameMode != null) // { // Destroy(CurrentGameMode); // } // break; // //case EAppScene.GAME: // // AddChosenGameMode(); // // break; //} }
private IEnumerator LateUpdateSceneCoroutine(EAppScene newScene) { yield return(new WaitForSeconds(BConsts.TIME_BEFORE_SCENE_CHANGE)); LoadScene(newScene); }
protected override void OnNewSceneReinitialize(EAppScene newScene, EAppScene lastScene) { base.OnNewSceneReinitialize(newScene, lastScene); }
protected virtual void OnNewSceneReinitialize(EAppScene newScene, EAppScene lastScene) { }
protected override void OnNewSceneReinitialize(EAppScene newScene, EAppScene lastScene) { base.OnNewSceneReinitialize(newScene, lastScene); StartCoroutine(DelayedUpdateStateCoroutine(newScene)); }