コード例 #1
0
    public void ChangeState(IMoveAction newState)
    {
        CurrentState.Exit();

        CurrentState = newState;
        newState.Enter();
    }
コード例 #2
0
    public void Initialize(IMoveAction startingState)
    {
        ActionState     = PlayerAction.move;
        PlayerDirection = Vector2.zero;

        CurrentState = startingState;
        startingState.Enter();
    }