Пример #1
0
        public PlaySongCommand(Song song, Volume volume)
        {
            song.ThrowIfNull("song");

            _song = song;
            _volume = volume;
        }
        public PlaySoundEffectCommand(SoundEffect soundEffect, Volume volume)
        {
            soundEffect.ThrowIfNull("soundEffect");

            _soundEffect = soundEffect;
            _volume = volume;
        }
Пример #3
0
        public void PlaySoundEffect(Guid id, byte[] data, Volume volume)
        {
            data.ThrowIfNull("data");

            var adjustedParameters = new SoundParameters(volume * _volumeConfiguration.SoundEffects, _soundEffectsMuted);

            _soundEffectManager.Play(id, data, adjustedParameters);
        }
Пример #4
0
 public static PlaySongCommand PlaySong(Song song, Volume volume)
 {
     return new PlaySongCommand(song, volume);
 }
Пример #5
0
 public static PlaySoundEffectCommand PlaySoundEffect(SoundEffect soundEffect, Volume volume)
 {
     return new PlaySoundEffectCommand(soundEffect, volume);
 }
 public SoundParameters(Volume volume, bool muted)
 {
     _volume = volume;
     _muted = muted;
 }