IEnumerator Shoot() { shootable = false; if (ammoSlot.GetCurrentAmmo(ammoType) > 0) { PlayMuzzleFlash(); myAudioSource.PlayOneShot(weaponSFX); ProcessRaycast(); ammoSlot.DecreaseAmmo(ammoType); } yield return(new WaitForSeconds(timeBetweenShots)); shootable = true; }