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

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