Пример #1
0
    IEnumerator playFootstepSounds(float delay)
    {
        while (true)
        {
            if (rb.velocity != Vector2.zero)
            {
                footsteps.PlayClip(playerSounds);
            }

            yield return(new WaitForSeconds(delay));
        }
    }
Пример #2
0
 public void PlayClip(SoundClip clip)
 {
     clip.PlayClip(source);
 }
Пример #3
0
 public void PlayClip(SoundClip clip)
 {
     clip.PlayClip(audioSources[GetFreeAudioSourceIdx()]);
 }