public void HandleInput() { if (!isDashing && Input.GetKeyDown(controller.AttackKey)) { controller.SetPlayerState(new PlayerAttackState(controller)); } }
public void HandleInput() { if (animator.IsInTransition(0)) { return; } if (!animator.GetCurrentAnimatorStateInfo(0).IsTag("Attack")) { if (animator.GetCurrentAnimatorStateInfo(0).IsTag("Move")) { controller.SetPlayerState(new PlayerMove2DState(controller)); Debug.Log("exit attack"); } } }