Exemplo n.º 1
0
    public void UpdateState(PlayerInputs input)
    {
        if (changedState)
        {
            CurrentState.OnExitState();

            PreviousState       = CurrentState;
            CurrentState        = NextState;
            MovementModel.State = CurrentState.State;

            CurrentState.OnEnterState();

            changedState = false;
        }

        CurrentState.OnUpdateState(input);
    }