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