public void Init() { graphNavigator = gameObject.GetComponent <GraphNavigator>(); // Deferred to Init method to wait for GameManager to be instantiated. var waypoint = targetWaypoint.GetComponent <WayPoint>(); var node = GameManager.instance.nodeFinder.FindAdapter(waypoint); graphNavigator.SetTargetNode(node); }
public void PlaceInTown(Town town) { transform.position = town.transform.position; SourceTown = town; graphNavigator.SetTargetNode(SourceTown.Node); }