Exemple #1
0
        protected override void Execute(Actuator obj)
        {
            switch (_cmd)
            {
            case RadioCommand.StopRadio:
                _player.StopRadio();
                break;

            case RadioCommand.PlayRadio:
                _player.PlayRadio(_fileName);
                break;

            case RadioCommand.PlayFile:
                _player.PlayFile(_fileName);
                break;

            case RadioCommand.EnqueueYoutube:
                _player.EnqueueYoutubeFile(obj["param1"]);
                break;

            case RadioCommand.CancelTrack:
                _player.CancelCurrentTrack();
                break;

            case RadioCommand.Mute:
                CommandFactory.GlobalVolume = 0.0;
                break;

            case RadioCommand.VolumeDown:
                CommandFactory.GlobalVolume -= 0.1;
                break;

            case RadioCommand.VolumeUp:
                CommandFactory.GlobalVolume += 0.1;
                break;
            }
        }
Exemple #2
0
 public void Fire(Actuator obj)
 {
     this.Execute(obj);
 }
Exemple #3
0
 protected abstract void Execute(Actuator obj);
Exemple #4
0
 private void _actuator_OnActuating(Actuator obj)
 {
     Execute(obj);
 }
Exemple #5
0
        protected override void Execute(Actuator act)
        {
            Sound snd = this.SoundFiles[_rnd.Next(SoundFiles.Count)];

            Play(snd.uri, this.Volume * snd.Volume * CommandFactory.GlobalVolume);
        }
Exemple #6
0
 protected override void Execute(Actuator act)
 {
     CommandFactory.Talk(_voice, _text);
 }
Exemple #7
0
 protected override void Execute(Actuator act)
 {
     run(_cmdid);
 }