Example #1
0
        protected void CreatePath()
        {
            SetAsPath(endWaypoint);
            endWaypoint.SetTopColor(Color.blue);

            Waypoint previous = endWaypoint.exploredFrom;

            while (previous != startWaypoint)
            {
                SetAsPath(previous);
                previous.SetTopColor(Color.blue);
                previous = previous.exploredFrom;
            }

            SetAsPath(startWaypoint);
            path.Reverse();
        }
Example #2
0
 public void ColorStartAndEnd()
 {
     startWaypoint.SetTopColor(Color.green);
     endWaypoint.SetTopColor(Color.red);
 }