Beispiel #1
0
 void Update()
 {
     if (Input.GetMouseButton(0))
     {
         if (shootingScript.AbleToShoot() && !playerMovement.isSprinting)
         {
             shootingScript.ShootPrimaryWeapon();
         }
     }
 }
Beispiel #2
0
 void Fire()
 {
     if (target == null)
     {
         return;
     }
     if (CheckIfTargetInFiringArc())
     {
         if (shooting.AbleToShoot())
         {
             shooting.ShootPrimaryWeapon();
         }
     }
 }