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; } }
public void Fire(Actuator obj) { this.Execute(obj); }
protected abstract void Execute(Actuator obj);
private void _actuator_OnActuating(Actuator obj) { Execute(obj); }
protected override void Execute(Actuator act) { Sound snd = this.SoundFiles[_rnd.Next(SoundFiles.Count)]; Play(snd.uri, this.Volume * snd.Volume * CommandFactory.GlobalVolume); }
protected override void Execute(Actuator act) { CommandFactory.Talk(_voice, _text); }
protected override void Execute(Actuator act) { run(_cmdid); }