//設定狀態 public void SetState(GameFlowState State, MainGameStateControl m_MainGameStateController) { GameState = State; m_bRunBegin = false; if (m_State != null) { m_State.StateEnd(); } //設定State switch (State) { case GameFlowState.Init: m_State = new InitState(m_MainGameStateController); break; case GameFlowState.DriveForkKit: m_State = new DriveForkleftState(m_MainGameStateController); break; case GameFlowState.CompleteTest: m_State = new CompleteTestState(m_MainGameStateController); break; case GameFlowState.CompletePrictice: m_State = new CompletePricticeState(m_MainGameStateController); break; } }
public CompletePricticeState(MainGameStateControl Controller) : base(Controller) { this.StateName = "CompletePricticeState"; }
public DriveForkleftState(MainGameStateControl Controller) : base(Controller) { this.StateName = "CompleteState"; }
public InitState(MainGameStateControl Controller) : base(Controller) { this.StateName = "InitState"; }
//建構狀態 public IMainGameState(MainGameStateControl Controller) { m_Conrtoller = Controller; }