public void ResolveViewAudioEvent(ViewAudioEvent eventType) { var audioSetting = _config.ViewAudioEventSettings.FirstOrDefault(e => e.AudioEventType.Equals(eventType)); if (audioSetting?.AudioClip == null) { return; } Play(audioSetting.AudioClip); }
private void PlaySoundEffect(ViewAudioEvent soundEffectType) { if (!_config.SoundEffectsEnabled) { return; } if (_config.slideInFrom.Equals(SlideDirection.Instant) && !_config.SoundEffectsEnabledOnInstant) { return; } MessageBroker.Default.Publish(soundEffectType); }