示例#1
0
 //添加到管理器
 public void RegiestScene(string sname, ISceneState scenestate)
 {
     if (!sceneStateDic.ContainsKey(sname))
     {
         sceneStateDic.Add(sname, scenestate);
     }
 }
示例#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);
         }
     }
 }
示例#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;
 }