Ejemplo n.º 1
0
 IEnumerator Zip()
 {
     while (true)
     {
         if (zip1)
         {
             ghook.ActivateZip(1);
         }
         if (zip2)
         {
             ghook.ActivateZip(2);
         }
         yield return(null);
     }
 }
Ejemplo n.º 2
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);
     }
 }