コード例 #1
0
        /// <see cref="Weapon.IsInRange"/>
        protected override bool IsInRange(RCNumber distance)
        {
            if (this.weaponData.RangeMax.Read() == 0)
            {
                return(distance <= Weapon.NEARBY_DISTANCE);
            }
            RCNumber quadDistance = MapUtils.CellToQuadDistance(distance);

            return(quadDistance >= this.weaponData.RangeMin.Read() && quadDistance <= this.weaponData.RangeMax.Read());
        }