Exemplo n.º 1
0
        public void Resolve(SectorMap 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[World.X, World.Y];
        }
Exemplo n.º 2
0
        public WorldLocation(Sector sector, World world)
        {
            if (sector == null)
                throw new ArgumentNullException("sector");
            if (world == null)
                throw new ArgumentNullException("world");

            Sector = sector.Location;
            World = world.Location;
        }