Beispiel #1
0
        public void UpdateTick()
        {
            if (_currentState != null)
            {
                var next = _currentState.ShoudExit();
                if (next != null && next != _currentState.GetType())
                {
                    _currentState.OnExit();
                    _currentState = _fsmStates[next];
                    _currentState.OnEnter();
                }

                _currentState.OnUpdate();
            }
        }
Beispiel #2
0
 public void Release()
 {
     SetExecute(false);
     m_CurState?.OnExit();
     m_CurState = null;
 }