Ejemplo n.º 1
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);
    }
Ejemplo n.º 2
0
    public void PlayShootSound()
    {
        audioInfo.SetCustomPitch(Random.Range(fireSoundMinPitch, fireSoundMaxPitch));
        audioInfo.continuePlayingAfterDie = true;

        if (!playFireSoundAsOneShot)
        {
            audioInfo.PlayClip(soundsFire);
        }
        else
        {
            audioInfo.PlayClip_OneShot(soundsFire);
        }
    }