public void CheckForWaypointEvent(
     IWaypointsFollower follower,
     float normalizedPositionOnCurve
     )
 {
     while (true)
     {
         if (thisCurrentWaypontCurveEvents.Count != 0)
         {
             IWaypointEvent nextWaypontEvent = thisCurrentWaypontCurveEvents.Peek();
             float          eventPoint       = nextWaypontEvent.GetEventPoint();
             if (eventPoint <= normalizedPositionOnCurve)
             {
                 if (eventPoint >= thisInitialEventPoint)
                 {
                     nextWaypontEvent = thisCurrentWaypontCurveEvents.Dequeue();
                     if (!nextWaypontEvent.IsExecuted())
                     {
                         nextWaypontEvent.Execute(follower);
                     }
                 }
             }
             else
             {
                 break;
             }
         }
         else
         {
             break;
         }
     }
 }
Пример #2
0
 public int Compare(IWaypointEvent a, IWaypointEvent b)
 {
     return(a.GetEventPoint().CompareTo(b.GetEventPoint()));
 }