Esempio n. 1
0
 //添加到管理器
 public void RegiestScene(string sname, ISceneState scenestate)
 {
     if (!sceneStateDic.ContainsKey(sname))
     {
         sceneStateDic.Add(sname, scenestate);
     }
 }
Esempio n. 2
0
 public void LoadScene(string loadSceneName)
 {
     if (sceneStateDic.ContainsKey(loadSceneName))
     {
         ISceneState scenestate = sceneStateDic[loadSceneName];
         if (scenestate != null)
         {
             lastSceneName = curSceneName;
             curSceneName  = loadSceneName;
             mController.SetState(scenestate, loadSceneName);
         }
     }
 }
Esempio n. 3
0
 //设置状态
 public void SetState(ISceneState State, string loadSceneName)
 {
     m_bRunBegin = false;
     if (loadSceneName != "")
     {
         LoadScene(loadSceneName);
     }
     if (m_State != null)
     {
         m_State.StateEnd();
     }
     m_State = State;
 }