public static LocationDto GetNextLocaltion(string lineId, LocationDto currentLocation, double speed, int interval, ref int nextIndex)
 {
     if (lines.TryGetValue(lineId, out var line))
     {
         if (nextIndex == 0)
         {
             return(line.Locations[nextIndex++]);
         }
         return(LocationInterpolation.GetNextLation(line.Locations, currentLocation, speed, interval, ref nextIndex));
     }
     return(default);
Пример #2
0
 public LineManager(LocationInterpolation locationInterpolation)
 {
     this.locationInterpolation = locationInterpolation;
 }