Beispiel #1
0
        public SKSound PlaySound(AudioClip audioClip, float volumeScale, float pitch, float pan)
        {
            SKSound sound = NextAvailableSound();

            sound.PlayAudioClip(audioClip, volumeScale * soundEffectVolume, pitch, pan);

            return(sound);
        }
Beispiel #2
0
        public SKSound PlaySoundLooped(AudioClip audioClip)
        {
            SKSound sound = NextAvailableSound();

            sound.PlayAudioClip(audioClip, soundEffectVolume, 1f, 0f);
            sound.SetLoop(true);

            return(sound);
        }