// 設定狀態 public void SetState(ISceneState State, string LoadSceneName) { m_LoadSceneName = LoadSceneName; //if (LoadSceneName!="") //{ // m_LoadSceneName = LoadSceneName; //} //else //{ // m_LoadSceneName = "StartScene"; //} Debug.Log("SetState:" + State.ToString()); m_bRunBegin = false; // 載入場景 LoadScene(LoadSceneName); // 通知前一個State結束 if (m_State != null) { m_State.StateEnd(); Debug.Log(m_State); } // 設定 m_State = State; Debug.Log(m_State); }
public void SetState(ISceneState State, string LoadSceneName) { Debug.Log("SetState:" + State.ToString()); m_bRunBegin = false; LoadScene(LoadSceneName); //close the front(facade) scene if (m_State != null) { m_State.StateEnd(); } m_State = State; }
// 設定狀態 public void SetState(ISceneState State, string LoadSceneName) { Debug.Log("SetState:" + State.ToString()); m_bRunBegin = false; // 載入場景 LoadScene(LoadSceneName); // 通知前一個State結束 if (m_State != null) { m_State.StateEnd(); } // 設定 m_State = State; }
/// <summary> /// 设置状态 /// </summary> /// <param name="State">状态接口</param> /// <param name="LoadSceneName">场景名称</param> public void SetState(ISceneState State, string LoadSceneName) { Debug.Log("SetState:" + State.ToString()); m_bRunBegin = false; //载入场景 LoadScene(LoadSceneName); //通知前一个场景结束 if (m_State != null) { m_State.StateEnd(); } //设置当前场景 m_State = State; }
/// <summary> /// 设置状态 /// </summary> /// <param name="State"></param> /// <param name="LoadLevelName"></param> public void SetState(ISceneState State, string LoadLevelName) { Debug.Log("SetState:" + State.ToString()); m_bRunBegin = false; //载入场景 LoadLevel(LoadLevelName); //让前一个场景状态结束 if (m_State != null) { m_State.StateEnd(); } //设置状态 m_State = State; }
public void SetState(ISceneState state, bool isLoadScene = true) { //通知前一个State结束 if (state != null) { state.StateEnd(); } Debug.Log("SetState:" + state.ToString()); this.state = state; if (isLoadScene) { m_AO = SceneManager.LoadSceneAsync(state.SceneName); isRunStart = false; } else { state.StateStart(); isRunStart = true; } }
public void SetState(ISceneState State, string LoadSceneName, GameLoop _gameLoop) { Debug.Log("SetState:" + State.ToString()); m_bRunBegin = false; //0430 gameLoop = _gameLoop; //載入場景 LoadScene(LoadSceneName); //gameLoop.StartLoadScene(LoadSceneName); //gameLoop.StartCoroutine(LoadAsynchronously(LoadSceneName, State)); //通知前一個State結束 if (m_State != null) { m_State.StateEnd(); } //設定 m_State = State; //gameLoop.StartCoroutine(CheckLoadFinish(State)); }