Ejemplo n.º 1
0
 public DungeonFloorStructure(DungeonStructure dungeon_structure, SDungeonFloor floor_desc, bool isLastFloor, DungeonFloorStructure prev)
 {
     pos = new Position(0, 0);
     start_pos = new Position(0, 0);
     prev_floor_structure = prev;
     this.dungeon_structure = dungeon_structure;
     HasBossRoom = floor_desc.HasBossRoom;
     branchProbability = floor_desc.branchProbability;
     coverageFactor = floor_desc.coverageFactor;
     IsLastFloor = isLastFloor;
     _calculate_size(floor_desc);
     _init_roomtraits();
     maze_generator = new MazeGenerator();
     _generate_maze(floor_desc);
 }
Ejemplo n.º 2
0
 public DungeonFloorStructure(DungeonStructure dungeon_structure, SDungeonFloor floor_desc, bool isLastFloor, DungeonFloorStructure prev)
 {
     pos                    = new Position(0, 0);
     start_pos              = new Position(0, 0);
     prev_floor_structure   = prev;
     this.dungeon_structure = dungeon_structure;
     HasBossRoom            = floor_desc.HasBossRoom;
     branchProbability      = floor_desc.branchProbability;
     coverageFactor         = floor_desc.coverageFactor;
     IsLastFloor            = isLastFloor;
     _calculate_size(floor_desc);
     _init_roomtraits();
     maze_generator = new MazeGenerator();
     _generate_maze(floor_desc);
 }
Ejemplo n.º 3
0
 public DungeonStructure(string dungeon_class, int instance_id, int item_id, string option, int seed, int floorplan)
 {
     DungeonClass s_dungeon_class = DungeonClass.LoadDungeonClass(dungeon_class);
     this.name = s_dungeon_class.Name;
     this.seed = seed;
     this.floorplan = floorplan;
     this.option = option.ToLower();
     // init random generators
     MT_maze = new MTRandom(s_dungeon_class.BaseSeed + item_id + floorplan);
     MT_puzzle = new MTRandom(seed);
     //init floors
     floors = new List<DungeonFloorStructure>();
     DungeonFloorStructure prev = null;
     for (int i = 0; i < s_dungeon_class.Floors.Count; i++)
     {
         bool last_floor = i == s_dungeon_class.Floors.Count - 1;
         DungeonFloorStructure floor = new DungeonFloorStructure(this, s_dungeon_class.GetFloorDesc(i), last_floor, prev);
         prev = floor;
         floors.Add(floor);
     }
 }
Ejemplo n.º 4
0
        public DungeonStructure(string dungeon_class, int instance_id, int item_id, string option, int seed, int floorplan)
        {
            DungeonClass s_dungeon_class = DungeonClass.LoadDungeonClass(dungeon_class);

            this.name      = s_dungeon_class.Name;
            this.seed      = seed;
            this.floorplan = floorplan;
            this.option    = option.ToLower();
            // init random generators
            MT_maze   = new MTRandom(s_dungeon_class.BaseSeed + item_id + floorplan);
            MT_puzzle = new MTRandom(seed);
            //init floors
            floors = new List <DungeonFloorStructure>();
            DungeonFloorStructure prev = null;

            for (int i = 0; i < s_dungeon_class.Floors.Count; i++)
            {
                bool last_floor             = i == s_dungeon_class.Floors.Count - 1;
                DungeonFloorStructure floor = new DungeonFloorStructure(this, s_dungeon_class.GetFloorDesc(i), last_floor, prev);
                prev = floor;
                floors.Add(floor);
            }
        }