protected internal override void VisitPlaySoundCommand(PlaySoundCommand playSoundCommand) { this.WriteIndent(); if (playSoundCommand.Repeats > 1) { this.writer.WriteLine("sound {0} {1}", playSoundCommand.Path, playSoundCommand.Repeats); } else { this.writer.WriteLine("sound {0}", playSoundCommand.Path); } }
public static IConcreteCommand instantiateConcreteCommand(Command command, IZoneServer zoneServer, Dictionary <int, IAudioDriver> audioDrivers) { if (typeof(SendMailCommand) == command.GetType()) { return(new ConcreteSendMailCommand((SendMailCommand)command)); } else if (typeof(PlaySoundCommand) == command.GetType()) { PlaySoundCommand playSoundCommand = (PlaySoundCommand)command; return(new ConcretePlaySoundCommand(playSoundCommand, zoneServer, audioDrivers[playSoundCommand.SourceId.ObjectId])); } else if (typeof(SendNuvoCommand) == command.GetType()) { return(new ConcreteSendNuvoCommand((SendNuvoCommand)command, zoneServer)); } return(null); }
public EventCommandPlayBgs(PlaySoundCommand refCommand, FrmEvent editor) { InitializeComponent(); mMyCommand = refCommand; mEventEditor = editor; InitLocalization(); cmbSound.Items.Clear(); cmbSound.Items.Add(Strings.General.none); cmbSound.Items.AddRange(GameContentManager.SmartSortedSoundNames); if (cmbSound.Items.IndexOf(TextUtils.NullToNone(mMyCommand.File)) > -1) { cmbSound.SelectedIndex = cmbSound.Items.IndexOf(TextUtils.NullToNone(mMyCommand.File)); } else { cmbSound.SelectedIndex = 0; } }
public ConcretePlaySoundCommand(PlaySoundCommand command, IZoneServer zoneServer, IAudioDriver audioDriver) : base(command) { _playSoundCommand = command; _audioDriver = audioDriver; }
private static string GetCommandText(PlaySoundCommand command, MapInstance map) { return(Strings.EventCommandList.playsound.ToString(command.File)); }