示例#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);
 }