Exemplo n.º 1
0
        protected override void OnNewSceneReinitialize(EAppScene newScene, EAppScene lastScene)
        {
            base.OnNewSceneReinitialize(newScene, lastScene);

            FindPlayerSpawnPositionsInScene();

            ReinitializeDictionaries();
        }
Exemplo n.º 2
0
        protected override void OnNewSceneReinitialize(EAppScene newScene, EAppScene lastScene)
        {
            base.OnNewSceneReinitialize(newScene, lastScene);

            ReinitializeDebugTexts();

            notifcationWindow = FindObjectOfType <NotifcationWindow>();
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        private IEnumerator DelayedUpdateStateCoroutine(EAppScene newScene)
        {
            yield return(new WaitForEndOfFrame());

            if (IS_KEY_CONTAINED(startStatesMap, newScene))
            {
                UpdateState(startStatesMap[newScene]);
            }
        }
Exemplo n.º 5
0
 private void LoadScene(EAppScene sceneToLoad)
 {
     if (sceneBuildNamesMap.ContainsKey(sceneToLoad))
     {
         SceneManager.LoadScene(sceneBuildNamesMap[sceneToLoad]);
     }
     else
     {
         LogConsoleError("No scene build name was specified for : " + sceneToLoad);
     }
 }
Exemplo n.º 6
0
        /// <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));
        }
Exemplo n.º 7
0
        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;
            //}
        }
Exemplo n.º 8
0
        private IEnumerator LateUpdateSceneCoroutine(EAppScene newScene)
        {
            yield return(new WaitForSeconds(BConsts.TIME_BEFORE_SCENE_CHANGE));

            LoadScene(newScene);
        }
Exemplo n.º 9
0
 protected override void OnNewSceneReinitialize(EAppScene newScene, EAppScene lastScene)
 {
     base.OnNewSceneReinitialize(newScene, lastScene);
 }
Exemplo n.º 10
0
 protected virtual void OnNewSceneReinitialize(EAppScene newScene, EAppScene lastScene)
 {
 }
Exemplo n.º 11
0
        protected override void OnNewSceneReinitialize(EAppScene newScene, EAppScene lastScene)
        {
            base.OnNewSceneReinitialize(newScene, lastScene);

            StartCoroutine(DelayedUpdateStateCoroutine(newScene));
        }