Exemple #1
0
 private void Awake()
 {
     ParentChain = transform.parent.GetComponent <WaypointChain>();
     if (NextWaypoint == null)
     {
         isEndpoint = true;
     }
 }
Exemple #2
0
 public void OnModeChanged()
 {
     if (NavMode == Modes.Patrol)
     {
         if (TargetChain == null)
         {
             TargetChain = FindNearestWaypoint();
         }
         TargetChain.PopulateAgentsList();
         PatrolWaypoints(TargetChain);
     }
     if (NavMode == Modes.Stand)
     {
         StandInPlace();
     }
 }
Exemple #3
0
 void PatrolWaypoints(WaypointChain wChain)
 {
     Agent.SetDestination(wChain.ChainStart.position);
 }