Esempio n. 1
0
        //-------------------------------------------------------------------------------------------------------------
        private void INTERNAL_Go(STSScenesPackage sPackage, STSTransitionData sNewData)
        {
            if (sPackage == null)
            {
                sPackage = INTERNAL_GetDefaultScenesPackage();
            }
            List <string> tScenesToRemove = new List <string>();

            for (int tSceneIndex = 0; tSceneIndex < SceneManager.sceneCount; tSceneIndex++)
            {
                Scene tScene = SceneManager.GetSceneAt(tSceneIndex);
                tScenesToRemove.Add(tScene.name);
            }
            if (sNewData == null)
            {
                sNewData = sPackage.Datas;
            }
            Singleton().INTERNAL_ChangeScenes(SceneManager.GetActiveScene().name,
                                              sPackage.ActiveSceneName,
                                              sPackage.ScenesNameList,
                                              tScenesToRemove,
                                              sPackage.IntermissionScene,
                                              sNewData,
                                              false);
        }
Esempio n. 2
0
        //-------------------------------------------------------------------------------------------------------------
        private void INTERNAL_AddNavigation(string sActiveSceneName, List <string> sScenesNameList, string sIntermissionScene, STSTransitionData sDatas)
        {
            INTERNAL_GetDefaultScenesPackage(); // create default
            STSScenesPackage tScenePackage = new STSScenesPackage(sActiveSceneName, sScenesNameList, sIntermissionScene, sDatas);

            Historic.Add(tScenePackage);
        }
Esempio n. 3
0
 //-------------------------------------------------------------------------------------------------------------
 private STSScenesPackage INTERNAL_GetDefaultScenesPackage()
 {
     if (DefaultScenesPackage == null)
     {
         if (OriginalScene == null)
         {
             OriginalScene = new STSScene();
             Scene tScene = SceneManager.GetActiveScene();
             if (tScene.path != null)
             {
                 OriginalScene.ScenePath = tScene.path;
             }
         }
         DefaultScenesPackage = new STSScenesPackage(OriginalScene.GetSceneShortName(), null, null, null);
     }
     return(DefaultScenesPackage);
 }