Esempio n. 1
0
		public ConveyorShape(Conveyor element)
		{
			InitializeComponent();
			this.RenderTransformOrigin = new Point(0.5, 0.5);
			this.RenderTransform = new RotateTransform(DirectionToAngle(element.direction));
			if (element.speed == 2)
				this.Arrow.Fill = new SolidColorBrush(Colors.LightBlue);
		}
Esempio n. 2
0
		void AddConveyor(int x, int y, Direction direction, int speed)
		{
			var conveyor = new Conveyor();
			conveyor.position = new Position(x, y);
			conveyor.direction = direction;
			conveyor.speed = speed;
			boardElements.Add(conveyor);
		}