Example #1
0
        public override async ValueTask Update(GameContext game)
        {
            if (null == _currentState)
            {
                _currentState = _defaultState;
                _currentState.Enter(_animationComponent);
            }

            await _currentState.Update(this);
        }
Example #2
0
 public void SetCurrentState(AnimationState state)
 {
     _currentState = state;
     _currentState?.Enter(_animationComponent);
 }