Example #1
0
		private void onOrderRemoved(object sender, OrderEventArgs e)
		{
			if(e.order.Type == "Defend")
				this.orderDecals.DefendOrderContainer.Visibility = Visibility.Collapsed;
			else if(e.order.Type == "Buy")
				this.orderDecals.BuyOrderContainer.Visibility = Visibility.Collapsed;
			else if(e.order.Type == "Gather")
				this.orderDecals.GatherOrderContainer.Visibility = Visibility.Collapsed;
			else if(e.order.Type == "Move")
			{
				if(e.order.Source.x - e.order.Destination.x == 1)
					this.orderDecals.LeftMoveOrderContainer.Visibility = Visibility.Collapsed;
				else if(e.order.Source.x - e.order.Destination.x == -1)
					this.orderDecals.RightMoveOrderContainer.Visibility = Visibility.Collapsed;
				else if(e.order.Source.y - e.order.Destination.y == 1)
					this.orderDecals.UpMoveOrderContainer.Visibility = Visibility.Collapsed;
				else if(e.order.Source.y - e.order.Destination.y == -1)
					this.orderDecals.DownMoveOrderContainer.Visibility = Visibility.Collapsed;
			}
		}
Example #2
0
		private void onOrderDeselected(object sender, OrderEventArgs e)
		{
			if(e.order.Type == "Defend")
				this.orderDecals.DefendOrderContainer.Opacity = 0.5;
			else if(e.order.Type == "Buy")
				this.orderDecals.BuyOrderContainer.Opacity = 0.5;
			else if(e.order.Type == "Gather")
				this.orderDecals.GatherOrderContainer.Opacity = 0.5;
			else if(e.order.Type == "Move")
			{
				if(e.order.Source.x - e.order.Destination.x == 1)
					this.orderDecals.LeftMoveOrderContainer.Opacity = 0.5;
				else if(e.order.Source.x - e.order.Destination.x == -1)
					this.orderDecals.RightMoveOrderContainer.Opacity = 0.5;
				else if(e.order.Source.y - e.order.Destination.y == 1)
					this.orderDecals.UpMoveOrderContainer.Opacity = 0.5;
				else if(e.order.Source.y - e.order.Destination.y == -1)
					this.orderDecals.DownMoveOrderContainer.Opacity = 0.5;
			}
		}
Example #3
0
		private void onOrderAdded(object sender, OrderEventArgs e)
		{
			this.displayAddedOrder(e.order);
		}