Esempio n. 1
0
 public SafePathResult(bool isSafe, FoundIntersection intersection)
 {
     IsSafe = isSafe;
     Intersection = intersection;
 }
Esempio n. 2
0
 private static SafePathResult IsSafePath(List<Vector2> path, int timeOffset, int speed = -1, int delay = 0)
 {
     var isSafe = false;
     var intersections = new List<FoundIntersection>();
     var intersection = new FoundIntersection();
     foreach (var sResult in
         SkillshotDetector.DetectedSkillshots.Where(i => i.Evade)
             .Select(i => i.IsSafePath(path, timeOffset, speed, delay)))
     {
         isSafe = sResult.IsSafe;
         if (sResult.Intersection.Valid)
         {
             intersections.Add(sResult.Intersection);
         }
     }
     return isSafe
         ? new SafePathResult(true, intersection)
         : new SafePathResult(
             false, intersections.Count > 0 ? intersections.OrderBy(i => i.Distance).First() : intersection);
 }
Esempio n. 3
0
 public SafePathResult(bool isSafe, FoundIntersection intersection)
 {
     IsSafe       = isSafe;
     Intersection = intersection;
 }