示例#1
0
 /// <summary>
 /// Constructor of the class
 /// </summary>
 /// <param name="name">name of the state</param>
 /// <param name="sceneName">Scene name of the state</param>
 public State(string name, string sceneName)
 {
     m_stateName = name;
     m_sceneState = new SceneInfo(sceneName);
     m_inputSet = null;
     m_isActive = false;
 }
示例#2
0
 /// <summary>
 /// Method used to load subscenes additively
 /// 
 /// Called from the SceneMgr to load a subscene within this scene
 /// </summary>
 /// <param name="subscene">Subscene to load</param>
 public void LoadSubscene(string subscene)
 {
     if (!m_subscenes.ContainsKey(subscene))
     {
         SceneInfo subSceneInfo = new SceneInfo(subscene);
         subSceneInfo.LoadSceneAdditive();
         m_subscenes.Add(subscene, subSceneInfo);
     }
 }
示例#3
0
 /// <summary>
 /// Method used to unload subscenes attached to the current Main Scene.
 /// 
 /// It will destroy all the GameObjects under the Root object of this subscene,
 /// this means that all gameObjects registered in PoolMgr will be cached again
 /// </summary>
 /// <param name="info">SceneInfo of the subscene to unload</param>
 public void UnloadSubScene(SceneInfo info)
 {
     UnloadSubScene(info.Name);
 }
示例#4
0
 /// <summary>
 /// Method used to load a subscene attached to the current Main Scene.
 /// 
 /// This operation may cause lag when laoding big subscenes in-game
 /// </summary>
 /// <param name="info">SceneInfo of the subscene to load</param>
 public void LoadSubSceneAdditive(SceneInfo info)
 {
     LoadSubSceneAdditive(info.Name);
 }
示例#5
0
 /// <summary>
 /// Method used to load a scene and replace the current Main Scene.
 /// 
 /// This operation may cause lag when laoding big scenes in-game
 /// </summary>
 /// <param name="info">SceneInfo of the scene to load</param>
 public void LoadScene(SceneInfo info)
 {
     GameMgr.Singleton.CurrentState.SceneInfo.DestroyScene();
     GameMgr.Singleton.CurrentState.SceneInfo = info;
     GameMgr.Singleton.CurrentState.SceneInfo.ActivateScene();
 }
示例#6
0
 /// <summary>
 /// Method used to load a scene and replace the current Main Scene.
 /// 
 /// This operation may cause lag when laoding big scenes in-game
 /// </summary>
 /// <param name="sceneName">Name of the scene to load</param>
 public void LoadScene(string sceneName)
 {
     SceneInfo sceneInfo = new SceneInfo(sceneName);
     LoadScene(sceneInfo);
     GameMgr.Singleton.CurrentState.SceneInfo.LoadSubscene(sceneName);
 }