Exemplo n.º 1
0
    IEnumerator playFootstepSounds(float delay)
    {
        while (true)
        {
            if (rb.velocity != Vector2.zero)
            {
                footsteps.PlayClip(playerSounds);
            }

            yield return(new WaitForSeconds(delay));
        }
    }
Exemplo n.º 2
0
 public void PlayClip(SoundClip clip)
 {
     clip.PlayClip(source);
 }
Exemplo n.º 3
0
 public void PlayClip(SoundClip clip)
 {
     clip.PlayClip(audioSources[GetFreeAudioSourceIdx()]);
 }