public PlayableTile(SeppukuMapTiles map, SeppukuMapTileModel model) : this() { this.map = map; this.model = model; this.model.select += this.onSelect; this.model.deselct += this.onDeselect; this.model.orderAdded += this.onOrderAdded; this.model.orderRemoved += this.onOrderRemoved; this.model.orderSelected += this.onOrderSelected; this.model.orderDeselected += this.onOrderDeselected; if (this.model.owner != null) { this.Flag.Fill = new SolidColorBrush(this.model.owner.color); this.WavingFlag.Begin(); this.WavingFlag.RepeatBehavior = RepeatBehavior.Forever; } else { this.FlagContainer.Visibility = Visibility.Collapsed; } foreach (IOrder order in this.model.mapModel.model.Orders) { if (order.Source == this.model) { this.displayAddedOrder(order); } } }
public PlayableTile(SeppukuMapTiles map, SeppukuMapTileModel model): this() { this.map = map; this.model = model; this.model.select += this.onSelect; this.model.deselct += this.onDeselect; this.model.orderAdded += this.onOrderAdded; this.model.orderRemoved += this.onOrderRemoved; this.model.orderSelected += this.onOrderSelected; this.model.orderDeselected += this.onOrderDeselected; if(this.model.owner != null) { this.Flag.Fill = new SolidColorBrush(this.model.owner.color); this.WavingFlag.Begin(); this.WavingFlag.RepeatBehavior = RepeatBehavior.Forever; } else this.FlagContainer.Visibility = Visibility.Collapsed; foreach(IOrder order in this.model.mapModel.model.Orders) { if(order.Source == this.model) this.displayAddedOrder(order); } }