Exemplo n.º 1
0
        public bool InArcByType(ArcTypes arcType)
        {
            if (!InArcInfo.ContainsKey(arcType))
            {
                return(false);
            }

            return(InArcInfo[arcType]);
        }
Exemplo n.º 2
0
        public bool InArcByType(ArcTypes arcType)
        {
            Dictionary <GenericArc, bool> filteredInfo = InArcInfo.Where(a => a.Key.ArcType == arcType).ToDictionary(a => a.Key, a => a.Value);

            if (filteredInfo == null || filteredInfo.Count == 0)
            {
                return(false);
            }

            foreach (var arcInfo in filteredInfo)
            {
                if (arcInfo.Value)
                {
                    return(true);
                }
            }

            return(false);
        }
Exemplo n.º 3
0
 public Arc(Point center, Distance radius, ArcTypes type, double lat1, double lon1, double lat2, double lon2) : base(lat1, lon1, lat2, lon2)
 {
     Center = center ?? throw new ArgumentNullException(nameof(center));
     Radius = radius ?? throw new ArgumentNullException(nameof(radius));
     Type   = type;
 }
Exemplo n.º 4
0
 public Arc(Point center, Distance radius, ArcTypes type, Point point1, Point point2) : base(point1, point2)
 {
     Center = center ?? throw new ArgumentNullException(nameof(center));
     Radius = radius ?? throw new ArgumentNullException(nameof(radius));
     Type   = type;
 }
Exemplo n.º 5
0
 public Arc(Point center, Distance radius, ArcTypes type, LineSegment lineSegment) : base(lineSegment)
 {
     Center = center ?? throw new ArgumentNullException(nameof(center));
     Radius = radius ?? throw new ArgumentNullException(nameof(radius));
     Type   = type;
 }
Exemplo n.º 6
0
        public static bool IsShipInArcByType(GenericShip source, GenericShip target, ArcTypes arc)
        {
            ShotInfo shotInfo = new ShotInfo(source, target, source.PrimaryWeapon);

            return(shotInfo.InArcByType(arc));
        }