Beispiel #1
0
 void Awake()
 {
     if (m_curState == null)
     {
         m_curState = SwitchStateByState(GAMESTATE_TYPE.GAMESTATE_NONE);
     }
 }
Beispiel #2
0
        //选择状态
        public IVLState SwitchStateByState(GAMESTATE_TYPE eStateType)
        {
            m_eCurState = eStateType;
            switch (eStateType)
            {
            case GAMESTATE_TYPE.GAMESTATE_LOADING:
                m_curState = new VLState_Loading();
                break;

            case GAMESTATE_TYPE.GAMESTATE_PLAY:
                m_curState = new VLState_Play();
                break;

            default:
                m_curState  = new VLState_Base();
                m_eCurState = GAMESTATE_TYPE.GAMESTATE_NONE;
                break;
            }
            return(m_curState);
        }