public bool InArcByType(ArcTypes arcType) { if (!InArcInfo.ContainsKey(arcType)) { return(false); } return(InArcInfo[arcType]); }
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); }
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; }
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; }
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; }
public static bool IsShipInArcByType(GenericShip source, GenericShip target, ArcTypes arc) { ShotInfo shotInfo = new ShotInfo(source, target, source.PrimaryWeapon); return(shotInfo.InArcByType(arc)); }