void PlaySound(AudioClip[] _audios, bool _randomPitch) { AudioClip[] audios = _audios; bool randomPitch = _randomPitch; if (randomPitch) { audioInfo_Main.SetCustomPitch(Random.Range(soundMinPitch, soundMaxPitch)); } else { audioInfo_Main.SetCustomPitch(1); } audioInfo_Main.PlayClip(audios); }
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); }
void AllyA_SetRandomPitch() { audioInfo_AllyA.SetCustomPitch(Random.Range(minPitch, maxPitch)); }
void SetRandomPitch() { audioInfo.SetCustomPitch(Random.Range(minPitch, maxPitch)); }
public void PlayReloadSound() { audioInfo.SetCustomPitch(1); audioInfo.continuePlayingAfterDie = false; audioInfo.PlayClip(soundsReload); }