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