Ejemplo n.º 1
0
    public void SwitchGameState(EGAME_STATE_TYPE type)
    {
        if (m_curState == null)
        {
            return;
        }
        m_curState.OnStateEnd();
        if (m_curState.GameState != type)
        {
            m_curState.OnStateEnd();
            switch (type)
            {
            case EGAME_STATE_TYPE.EGAME_STATE_BASE:
            {
                m_curState = new GameBaseState();
            }
            break;

            case EGAME_STATE_TYPE.EGAME_STATE_MENU:
            {
                m_curState = new GameMenuState();
            }
            break;

            case EGAME_STATE_TYPE.EGAME_STATE_GAME:
            {
                m_curState = new GameRunState();
            }
            break;
            }
        }
    }
Ejemplo n.º 2
0
 public void SwitchGameState(EGAME_STATE_TYPE type)
 {
     if (m_curState == null)
     {
         m_curState.OnStateEnd();
     }
     else if (m_curState.GameState != type)
     {
         m_curState.OnStateEnd();
         switch (type)
         {
         case EGAME_STATE_TYPE.EGAME_STATE_BASE:
         {
             m_curState = new GameBaseState();
         }
         break;
         }
     }
 }
Ejemplo n.º 3
0
 public void SwitchGameState(EGAME_STATE_TYPE type)
 {
     if (m_curState == null)
     {
     }
     else if (m_curState.GameState != type)
     {
         m_curState.OnStateEnd();
         switch (type)
         {
         }
     }
 }