public CommandGoForward(int tractorId, Map map) { this.map = map; this.tractor = map.Tractors.Where(a => a.Id == tractorId).First(); x = tractor.X; y = tractor.Y; }
public void InitObjects() { for (int j = 0; j < CurrentMap.Targets.Count; j++) { GameObject target = CurrentMap.Targets[j]; View.Children.Add(target.ImageControl); Canvas.SetLeft(target.ImageControl, target.X * CurrentMap.TileWidth); Canvas.SetTop(target.ImageControl, target.Y * CurrentMap.TileHeight); } for (int j = 0; j < CurrentMap.Tractors.Count; j++) { Tractor tractor = CurrentMap.Tractors[j]; int x = tractor.X * CurrentMap.TileWidth; int y = tractor.Y * CurrentMap.TileHeight; View.Children.Add(tractor.Backlight); View.Children.Add(tractor.ImageControl); View.Children.Add(tractor.Label); tractor.Init(CurrentMap.TileWidth, CurrentMap.TileHeight, CurrentMap.MapWidth, CurrentMap.MapHeight); } }
public CommandRoundToLeft(int tractorId, Map map) { this.map = map; this.tractor = map.Tractors.Where(a => a.Id == tractorId).First(); }