예제 #1
0
 public void SetSceneState(BaseSceneState sceneState)
 {
     if (m_state.GetESceneState() != sceneState.GetESceneState())
     {
         //开始准备切换场景
         m_bSceneLoaded = false;
         //清理当前场景
         m_state.SceneStateEnd();
         //设置新场景
         m_state = sceneState;
         //加载场景
         LoadScene(m_state.GetSceneName());
     }
 }
예제 #2
0
 public SceneController()
 {
     //初始状态为Login状态
     m_state = new LoginSceneState(this);
     m_state.SceneStateBegin();
 }