public void SetSceneState(BaseSceneState sceneState) { if (m_state.GetESceneState() != sceneState.GetESceneState()) { m_bSceneLoaded = false; m_state = sceneState; //执行上一个场景的结束 m_state.SceneStateEnd(); LoadScene(m_state.GetSceneName()); } }
public SceneController() { m_state = new MainMenuState(this); m_state.SceneStateBegin(); }