Пример #1
0
        public virtual void Start()
        {
            if (ConfigState.Instance.UseVerboseLogging)
            {
                Debug.Log("Base Scene Controller Start");
            }

            if (!DeferInitialRestoreToSubclass && AutoRestore)
            {
                MetaState.Instance.IntentsExecutePreload();
                MetaState.Instance.IntentsRemoveInvalid();
                Restore();
                MetaState.Instance.IntentsExecutePostload();
                MetaState.Instance.IntentsRemoveInvalid();
            }

            if (!DeferAfterSceneLoadToSubclass)
            {
                ScriptingModule.CallHooked(ScriptHook.AfterSceneLoad, this);
            }

            if (!DeferEnterAutosaveToSubclass && AutosaveOnEnter && MetaState.Instance.TransitionType != SceneTransitionType.LoadGame)
            {
                SaveUtils.DoAutoSave();
            }
        }
Пример #2
0
        public override void Start()
        {
            base.Start();
            if (ConfigState.Instance.UseVerboseLogging)
            {
                Debug.Log("World Scene Controller Start");
            }
            if (AutoRestore)
            {
                MetaState.Instance.IntentsExecutePreload();
                Restore();
                MetaState.Instance.IntentsExecutePostload();
            }

            if (!string.IsNullOrEmpty(SetMusic))
            {
                AudioPlayer.Instance.SetMusic(SetMusic, MusicSlot.Ambient, 1.0f, true, false);
                AudioPlayer.Instance.StartMusic(MusicSlot.Ambient);
            }

            ScriptingModule.CallHooked(ScriptHook.AfterSceneLoad, this);
            if (AutosaveOnEnter)
            {
                SaveUtils.DoAutoSave();
            }
        }
Пример #3
0
 /// <summary>
 /// Called when a scene is exiting. Should not actually exit the scene
 /// </summary>
 public virtual void ExitScene()
 {
     Debug.Log("Exiting scene: ");
     if (AutoCommit)
     {
         Commit();
     }
     if (AutosaveOnExit)
     {
         SaveUtils.DoAutoSave();
     }
 }
Пример #4
0
        public virtual void Start()
        {
            Debug.Log("Base Scene Controller Start");

            if (!DeferInitialRestoreToSubclass && AutoRestore)
            {
                MetaState.Instance.IntentsExecutePreload();
                Restore();
                MetaState.Instance.IntentsExecutePostload();
            }

            if (!DeferAfterSceneLoadToSubclass)
            {
                ScriptingModule.CallHooked(ScriptHook.AfterSceneLoad, this);
            }

            if (!DeferEnterAutosaveToSubclass && AutosaveOnEnter)
            {
                SaveUtils.DoAutoSave();
            }
        }