public void PlayFootStepSound(string _surfaceMaterial, PlayerFootEnum _foot) { string surfaceMaterial = _surfaceMaterial; PlayerFootEnum foot = _foot; AudioClip[] audios = footStepSoundList.GetFootStepAudio(surfaceMaterial, foot); footStepsAudioInfo.SetCustomPitch(Random.Range(footStepSoundMinPitch, footStepSoundMaxPitch)); footStepsAudioInfo.PlayClip_OneShot(audios); }
public void PlayShootSound() { audioInfo.SetCustomPitch(Random.Range(fireSoundMinPitch, fireSoundMaxPitch)); audioInfo.continuePlayingAfterDie = true; if (!playFireSoundAsOneShot) { audioInfo.PlayClip(soundsFire); } else { audioInfo.PlayClip_OneShot(soundsFire); } }