Example #1
0
    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);
    }
Example #2
0
    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);
    }
Example #3
0
 void AllyA_SetRandomPitch()
 {
     audioInfo_AllyA.SetCustomPitch(Random.Range(minPitch, maxPitch));
 }
Example #4
0
 void SetRandomPitch()
 {
     audioInfo.SetCustomPitch(Random.Range(minPitch, maxPitch));
 }
Example #5
0
 public void PlayReloadSound()
 {
     audioInfo.SetCustomPitch(1);
     audioInfo.continuePlayingAfterDie = false;
     audioInfo.PlayClip(soundsReload);
 }