Esempio n. 1
0
        public void ChangeState(LSState newState)
        {
            _perState = _curState;
            if (_curState != null)
            {
                _curState.Exit();
            }
            _curState = newState;

            _curState.Enter();
        }
Esempio n. 2
0
        public void InitState()
        {
            var gdata = App.GetGameData <LswcGameData>();

            YxDebug.Log("当前游戏阶段是: " + gdata.GlobalELswcGameStatu + "剩余时间是 :" + App.GetGameData <LswcGameData>().ShowTime);

            if (_loadFinished)
            {
                _curState = gdata.GameStates.InitState;//LSInitState.Instance;
                _curState.Enter();
            }
            else
            {
                YxDebug.LogError("Resourse is noe loaded finished");
            }
        }