public SKSound PlaySound(AudioClip audioClip, float volumeScale, float pitch, float pan) { SKSound sound = NextAvailableSound(); sound.PlayAudioClip(audioClip, volumeScale * soundEffectVolume, pitch, pan); return(sound); }
public SKSound PlaySoundLooped(AudioClip audioClip) { SKSound sound = NextAvailableSound(); sound.PlayAudioClip(audioClip, soundEffectVolume, 1f, 0f); sound.SetLoop(true); return(sound); }