Пример #1
0
        public void GotoState(int iKey)
        {
            if (_stateTable.ContainsKey(iKey) == true)
            {
                if (_currentState != null)
                {
                    _currentState.OnEnd(_stateTable[iKey]);
                }

                myState previousState = _currentState;

                _currentState = _stateTable[iKey];

                // _currentState.nowTime = previousState.nowTime;

                _currentState.OnBegin(previousState);
                Debug.Log("넘어가");
            }
        }
Пример #2
0
 public abstract void OnEnd(myState nextState);
Пример #3
0
 public abstract void OnBegin(myState previousState);
Пример #4
0
 public void AddState(int iKey, myState addState)
 {
     _stateTable.Add(iKey, addState);
     addState.SetKey(iKey);
 }