Beispiel #1
0
 private void HandleInput()
 {
     if (!PauseMenu.gameIsPaused)
     {
         horizontal = Input.GetAxis("Horizontal");
         if (Input.GetKeyDown(KeyCode.Space))
         {
             jump = true;
         }
         if (Input.GetMouseButtonDown(0))
         {
             if (!isPunching && !animator.GetCurrentAnimatorStateInfo(0).IsName("Punch"))
             {
                 isPunching = true;
             }
             else if (grappleSystem.IsSwinging())
             {
                 grappleSystem.RetractGrapple();
             }
         }
         if (Input.GetMouseButtonDown(1))
         {
             grappleSystem.StopGrapple();
         }
     }
 }