// Update is called once per frame
 void Update()
 {
     if ((joystickShooting.Horizontal != 0 || joystickShooting.Vertical != 0) && !playerGeneralShootController.IsReloading() && playerGeneralShootController.coolDownTimer > playerGeneralShootController.currGun.cooldownTime)
     {
         playerGeneralShootController.ShootHandgun();
     }
     if (Input.GetKeyDown(KeyCode.R))
     {
         playerGeneralShootController.Reload();
     }
 }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetButton("Fire1") &&
         ((!playerGeneralShootController.IsReloading() && playerGeneralShootController.coolDownTimer > playerGeneralShootController.currGun.cooldownTime) ||
          (Input.GetButtonDown("Fire1") && canShootOverride))
         )
     {
         playerGeneralShootController.ShootHandgun();
     }
     if (Input.GetKeyDown(KeyCode.R))
     {
         playerGeneralShootController.Reload();
     }
 }