示例#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()]);
 }