Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     System.Collections.Generic.List <Leap.Hand> hands = gestureRecogniser.getFrameHands();
     if (hands.Count >= 1)
     {
         string current_gesture = gestureRecogniser.Recognise(hands [0]);
         if (current_gesture == "FIST")
         {
             Firing fire = gun.GetComponent <Firing> ();
             fire.Fire();
         }
     }
 }
Exemplo n.º 2
0
    void Update()
    {
        // Can't shoot if running
        if (GameManager.Instance.LocalPlayer.PlayerState.MoveState == PlayerState.EMoveState.RUNNING)
        {
            return;
        }

        // Can't shoot if not aiming
        if (GameManager.Instance.LocalPlayer.PlayerState.WeaponState == PlayerState.EWeaponState.IDLE)
        {
            return;
        }
        if (GameManager.Instance.LocalPlayer.PlayerState.WeaponState == PlayerState.EWeaponState.RELOADING)
        {
            return;
        }

        if (GameManager.Instance.InputController.Fire1 && GameManager.Instance.InputController.Fire2)
        {
            grappleGun.Fire();
        }
    }