public HotPotatoGameCommandEditorWindowViewModel(HotPotatoGameCommandModel command) : base(command) { this.LowerTimeLimit = command.LowerTimeLimit; this.UpperTimeLimit = command.UpperTimeLimit; this.ResetTimeOnToss = command.ResetTimeOnToss; this.UserSelectionTargeted = command.PlayerSelectionType.HasFlag(GamePlayerSelectionType.Targeted); this.UserSelectionRandom = command.PlayerSelectionType.HasFlag(GamePlayerSelectionType.Random); this.StartedCommand = command.StartedCommand; this.TossPotatoCommand = command.TossPotatoCommand; this.PotatoExplodeCommand = command.PotatoExplodeCommand; }
public override async Task UpdateExistingCommand(CommandModelBase command) { await base.UpdateExistingCommand(command); HotPotatoGameCommandModel gCommand = (HotPotatoGameCommandModel)command; gCommand.LowerTimeLimit = this.LowerTimeLimit; gCommand.UpperTimeLimit = this.UpperTimeLimit; gCommand.ResetTimeOnToss = this.ResetTimeOnToss; gCommand.PlayerSelectionType = this.GetSelectionType(); gCommand.StartedCommand = this.StartedCommand; gCommand.TossPotatoCommand = this.TossPotatoCommand; gCommand.PotatoExplodeCommand = this.PotatoExplodeCommand; }