Example #1
0
        public Sector(int index, MapSector mapSector, SectorPlane floor, SectorPlane ceiling)
        {
            Index   = index;
            Floor   = floor;
            Ceiling = ceiling;
            SetLightLevel(mapSector.LightLevel);

            floor.Sector   = this;
            ceiling.Sector = this;
        }
Example #2
0
        private void CreateSectorsAndPlanes(MapData map)
        {
            foreach (MapSector mapSector in map.Sectors)
            {
                SectorPlane floor = new SectorPlane(SectorPlanes.Count, false,
                                                    mapSector.FloorHeight, mapSector.FloorTexture);
                SectorPlanes.Add(floor);

                SectorPlane ceiling = new SectorPlane(SectorPlanes.Count, true,
                                                      mapSector.CeilingHeight, mapSector.CeilingTexture);
                SectorPlanes.Add(ceiling);

                Sector sector = new Sector(Sectors.Count, mapSector, floor, ceiling);
                Sectors.Add(sector);
            }
        }