Example #1
0
 public void add(CoordinatePair pair)
 {
     tiles.Add(pair);
 }
Example #2
0
 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);
 }
Example #4
0
 public PipeLinkSelect(IController controller, CoordinatePair edge)
 {
     this.controller = controller;
     this.edge       = edge;
 }
Example #5
0
 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;
 }
Example #6
0
        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;
 }