Esempio n. 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();
            }
        }
Esempio n. 2
0
 private void Update()
 {
     m_CurState?.OnUpdate();
 }