public void ChangeState(IMoveAction newState) { CurrentState.Exit(); CurrentState = newState; newState.Enter(); }
public void Initialize(IMoveAction startingState) { ActionState = PlayerAction.move; PlayerDirection = Vector2.zero; CurrentState = startingState; startingState.Enter(); }