IEnumerator Fire() { canShoot = false; if (ammunitionSlot.GetAmmunitionAmount(ammunitionType) > 0) { PlayMuzzleFlash(); ProcessRaycast(); ammunitionSlot.ExpendAmmunition(ammunitionType); } yield return(new WaitForSeconds(timeBetweenShots)); canShoot = true; }