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); }
public void StartWalkingWaypointGroup(WaypointGroup g) { this.waypointGroup = g; if (customUpdateCoroutine != null) { StopCoroutine(customUpdateCoroutine); } customUpdateCoroutine = StartCoroutine(UpdateNextWaypointInterval()); }
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); } }