Esempio n. 1
0
        protected override void OnCreate()
        {
            this.scenesData = new ScenesData(SceneManager.GetActiveScene().name);
            SaveLoadManager.Instance.Initialize(this.scenesData);

            SceneManager.sceneLoaded   += this.OnLoadScene;
            SceneManager.sceneUnloaded += this.OnUnloadScene;
        }
Esempio n. 2
0
        protected override void OnCreate()
        {
            this.savesData  = new SavesData(this);
            this.scenesData = new ScenesData(SceneManager.GetActiveScene().name);
            this.keysData   = new KeysData();

            SceneManager.sceneLoaded   += this.OnLoadScene;
            SceneManager.sceneUnloaded += this.OnUnloadScene;
        }
Esempio n. 3
0
        public void OnLoad(object generic)
        {
            ScenesData data = (ScenesData)generic;

            this.mainScene      = data.mainScene;
            this.additiveScenes = data.additiveScenes;

            SceneManager.LoadScene(this.mainScene, LoadSceneMode.Single);
            for (int i = 0; i < this.additiveScenes.Count; ++i)
            {
                SceneManager.LoadScene(this.additiveScenes[i], LoadSceneMode.Additive);
            }
        }
Esempio n. 4
0
        public IEnumerator OnLoad(object generic)
        {
            ScenesData data = (ScenesData)generic;

            SceneManager.LoadScene(data.mainScene, LoadSceneMode.Single);
            yield return(null);

            for (int i = 0; i < data.additiveScenes.Count; ++i)
            {
                SceneManager.LoadScene(data.additiveScenes[i], LoadSceneMode.Additive);
                yield return(null);
            }

            this.mainScene      = data.mainScene;
            this.additiveScenes = data.additiveScenes;
        }