private void Shoot() { if (ammo.GetCurrentAmmo() > 0) { recoil.Fire(); PlayMuzzleFlash(); ProcessRayCastTarget(); ProcessRayCastTarget_Single(); ProcessRayCastTarget_Boss(); PlayAllAudio(); ammo.ReduceCurrentAmmo(); } else if (ammo.GetCurrentAmmo() == 0) { audios.PlayOneShot(ammoEmpty); } }
private void DisplayAmmo() { int currentAmmo = ammoSlot.GetCurrentAmmo(ammoType); ammoText.text = currentAmmo.ToString(); }