Esempio n. 1
0
        public void UseWaypointGroup(WaypointGroup group, int startWaypointIndex)
        {
            Assert.IsNotNull(group);

            this.waypointGroup   = group;
            currentWaypointIndex = startWaypointIndex;

            DevdogLogger.LogVerbose("Waypoint character controller is following new WaypointGroup", this);
        }
Esempio n. 2
0
        public void StartWalkingWaypointGroup(WaypointGroup g)
        {
            this.waypointGroup = g;

            if (customUpdateCoroutine != null)
            {
                StopCoroutine(customUpdateCoroutine);
            }
            customUpdateCoroutine = StartCoroutine(UpdateNextWaypointInterval());
        }
Esempio n. 3
0
 public void UseWaypointGroup(WaypointGroup group, bool startAtClosestWaypoint)
 {
     if (startAtClosestWaypoint)
     {
         var info = group.FindClosestWaypoint(transform.position);
         if (info.waypoint != null)
         {
             UseWaypointGroup(group, info.index);
         }
         else
         {
             DevdogLogger.LogWarning("Couldn't find closest waypoint in waypointGroup", this);
         }
     }
     else
     {
         UseWaypointGroup(group, 0);
     }
 }