예제 #1
0
        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);
        }
예제 #2
0
 public void PlaceInTown(Town town)
 {
     transform.position = town.transform.position;
     SourceTown         = town;
     graphNavigator.SetTargetNode(SourceTown.Node);
 }