示例#1
0
        public bool InArcByType(ArcTypes arcType)
        {
            if (!InArcInfo.ContainsKey(arcType))
            {
                return(false);
            }

            return(InArcInfo[arcType]);
        }
示例#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);
        }
示例#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;
 }
示例#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;
 }
示例#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;
 }
示例#6
0
文件: Board.cs 项目: xNyer/FlyCasual
        public static bool IsShipInArcByType(GenericShip source, GenericShip target, ArcTypes arc)
        {
            ShotInfo shotInfo = new ShotInfo(source, target, source.PrimaryWeapon);

            return(shotInfo.InArcByType(arc));
        }