示例#1
0
        public bool IsShipInSector(GenericShip anotherShip, ArcType arcType)
        {
            GenericArc  arc     = Arcs.First(n => n.ArcType == arcType);
            ShotInfoArc arcInfo = new ShotInfoArc(HostShip, anotherShip, arc);

            bool result = arcInfo.IsShotAvailable;

            if (arcType == ArcType.Bullseye)
            {
                HostShip.CallOnBullseyeArcCheck(anotherShip, ref result);
            }

            return(result);
        }
示例#2
0
        public int RangeToShipBySector(GenericShip anotherShip, ArcType arcType)
        {
            ShotInfoArc arcInfo = GetSectorInfo(anotherShip, arcType);

            if (arcInfo != null)
            {
                bool result = arcInfo.IsShotAvailable;
                if (arcType == ArcType.Bullseye)
                {
                    HostShip.CallOnBullseyeArcCheck(anotherShip, ref result);
                }

                return(result ? arcInfo.Range : int.MaxValue);
            }
            else
            {
                return(int.MaxValue);
            }
        }
示例#3
0
        public bool IsShipInSector(GenericShip anotherShip, ArcType arcType)
        {
            ShotInfoArc arcInfo = GetSectorInfo(anotherShip, arcType);

            if (arcInfo != null)
            {
                bool result = arcInfo.IsShotAvailable;
                if (arcType == ArcType.Bullseye)
                {
                    HostShip.CallOnBullseyeArcCheck(anotherShip, ref result);
                }

                return(result);
            }
            else
            {
                return(false);
            }
        }