public void ResolveViewAudioEvent(ViewAudioEvent eventType)
        {
            var audioSetting = _config.ViewAudioEventSettings.FirstOrDefault(e => e.AudioEventType.Equals(eventType));

            if (audioSetting?.AudioClip == null)
            {
                return;
            }

            Play(audioSetting.AudioClip);
        }
Example #2
0
        private void PlaySoundEffect(ViewAudioEvent soundEffectType)
        {
            if (!_config.SoundEffectsEnabled)
            {
                return;
            }

            if (_config.slideInFrom.Equals(SlideDirection.Instant) && !_config.SoundEffectsEnabledOnInstant)
            {
                return;
            }

            MessageBroker.Default.Publish(soundEffectType);
        }