Beispiel #1
0
        public Sector Resolve(SectorMap.Milieu sectorMap)
        {
            if (sectorMap == null)
            {
                throw new ArgumentNullException("sectorMap");
            }

            return(sectorMap.FromLocation(Astrometrics.CoordinatesToLocation(Coords).Sector));
        }
Beispiel #2
0
        public Sector Resolve(SectorMap.Milieu sectorMap)
        {
            if (sectorMap == null)
            {
                throw new ArgumentNullException("sectorMap");
            }

            return(sectorMap.FromLocation(SectorCoords.X, SectorCoords.Y));
        }
Beispiel #3
0
        public void Resolve(SectorMap.Milieu sectorMap, out Sector sector, out Subsector subsector)
        {
            if (sectorMap == null)
            {
                throw new ArgumentNullException("sectorMap");
            }

            sector    = null;
            subsector = null;

            sector = sectorMap.FromLocation(SectorLocation.X, SectorLocation.Y);
            if (sector != null)
            {
                subsector = sector.Subsector(Index);
            }
        }
Beispiel #4
0
        public void Resolve(SectorMap.Milieu sectorMap, ResourceManager resourceManager, out Sector sector, out World world)
        {
            if (sectorMap == null)
            {
                throw new ArgumentNullException("sectorMap");
            }

            sector = null;
            world  = null;

            sector = sectorMap.FromLocation(Sector.X, Sector.Y);
            if (sector == null)
            {
                return;
            }

            WorldCollection worlds = sector.GetWorlds(resourceManager, cacheResults: true);

            if (worlds != null)
            {
                world = worlds[Hex];
            }
        }