public void add(CoordinatePair pair) { tiles.Add(pair); }
public void ActivatePipeLink(CoordinatePair edge) { objectTable.GetPipeLink(edge).Activate(); activatedObjects.Add(objectTable.GetPipeLink(edge)); }
public void AssignPipeLinkControl(IWorldObject pipeLink, CoordinatePair edge) { pipeLink.LeftClickAction = new PipeLinkSelect(controller, edge); }
public PipeLinkSelect(IController controller, CoordinatePair edge) { this.controller = controller; this.edge = edge; }
public virtual void InitiateTile(CoordinatePair coordinatePair) { this.Coordinates = coordinatePair; this.position = new Vector3(this.Coordinates.X, -this.Coordinates.Y, this.layer); this.gameObject.transform.position = this.position; }
private Stack <Direction> ExtractPath(Dictionary <CoordinatePair, CoordinatePair> previouses, CoordinatePair destination) { Stack <Direction> path = new Stack <Direction>(); CoordinatePair currentNode = destination; while (previouses.TryGetValue(currentNode, out CoordinatePair previousNode)) { CoordinatePair difference = currentNode - previousNode; path.Push(difference.PrimaryDirection); currentNode = previousNode; } return(path); }
public void SelectPipeLink(CoordinatePair edge) { pipeBuildController.SelectedLink = edge; masterController.CurrentController = pipeBuildController; }