예제 #1
0
 public void HandleInput()
 {
     if (!isDashing && Input.GetKeyDown(controller.AttackKey))
     {
         controller.SetPlayerState(new PlayerAttackState(controller));
     }
 }
예제 #2
0
    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");
            }
        }
    }