Esempio n. 1
0
    private void SetDestinationForNextIntersection()
    {
        if (IntersectionAnalysis.PeekIntersections().KillHandler.KillPoint.HasValue)
        {
            IntersectionAnalysis.GetNextUnit();

            if (!IntersectionAnalysis.HasIntersections())
            {
                return;
            }
        }
        Destination.DestinationType = DestinationType.Intersection;
        Destination.Unit            = null;

        Destination.TargetLocation = IntersectionAnalysis.GetNextUnit().AngleDefinition.IntersectionPoint;
        // Set move direction AFTER the redirect to determine which way we're actually going to move!
    }
Esempio n. 2
0
 private bool ShouldUsePreviousIntersections(IntersectionAnalysis previousIntersectionAnalysis)
 {
     return(previousIntersectionAnalysis != null && previousIntersectionAnalysis.HasIntersections());
 }
Esempio n. 3
0
 private bool NothingFound()
 {
     return(IntersectionAnalysis.HasIntersections() == false && _parallelAnalysis.ParallelUnit == null);
 }
Esempio n. 4
0
 private bool ParallelAndIntersectionsFound()
 {
     return(IntersectionAnalysis.HasIntersections() && _parallelAnalysis.ParallelUnit != null);
 }
Esempio n. 5
0
 private bool OnlyParallelUnitFound()
 {
     return(IntersectionAnalysis.HasIntersections() == false && _parallelAnalysis.ParallelUnit != null);
 }