public IEnumerator Shoot() { if (ammoSlot.CurrentAmountAmmo(ammoType) > 0 && canShoot == true) { PlayMuzzleFX(); ProcessRaycast(); ammoSlot.AmmoDecrease(ammoType); canShoot = false; yield return(new WaitForSeconds(shootTimer)); canShoot = true; } }