Пример #1
0
    //設定狀態
    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;
        }
    }
Пример #2
0
 public CompletePricticeState(MainGameStateControl Controller) : base(Controller)
 {
     this.StateName = "CompletePricticeState";
 }
Пример #3
0
 public DriveForkleftState(MainGameStateControl Controller) : base(Controller)
 {
     this.StateName = "CompleteState";
 }
Пример #4
0
 public InitState(MainGameStateControl Controller) : base(Controller)
 {
     this.StateName = "InitState";
 }
Пример #5
0
 //建構狀態
 public IMainGameState(MainGameStateControl Controller)
 {
     m_Conrtoller = Controller;
 }