Beispiel #1
0
 void Update()
 {
     if ((player == null) || PauseMenu.gamePaused)
     {
         return;
     }
     if (player.device.LeftTrigger.IsPressed)
     {
         Debug.Log("left trigger is pressed");
     }
     if (respawn.IsRespawning())
     {
         gHook.AimHook(playerIndex + 1, Vector2.zero);
         gHook.Rappel(playerIndex + 1, Vector2.zero);
         mPick.AimPick(playerIndex + 1, Vector2.zero);
         return;
     }
     gHook.AimHook(playerIndex + 1, player.device.RightStick.Value);
     gHook.Rappel(playerIndex + 1, player.device.LeftStick.Value);
     mPick.AimPick(playerIndex + 1, player.device.LeftStick.Value);
     // allow aiming while stunned, but not tossing the pickaxe or shooting the hook
     if (stun.IsStunned())
     {
         return;
     }
     if (player.device.RightTrigger.IsPressed)
     {
         gHook.ThrowHook(playerIndex + 1);
     }
     if (player.device.RightTrigger.WasReleased)
     {
         gHook.RetractHook(playerIndex + 1);
     }
     if (!player.device.LeftTrigger.IsPressed)
     {
         gHook.ActivateZip(playerIndex + 1);
     }
 }