示例#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);
 }
 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);
 }
示例#3
0
        List <maze_move> _create_critical_path(int crit_path_min, int crit_path_max)
        {
            while (true)
            {
                maze_generator.setSize(width, height);
                _set_random_path_position();
                if (maze_generator.generateCriticalPath(dungeon_structure.MT_maze, crit_path_min, crit_path_max))
                {
                    start_pos = maze_generator.getStartPosition;
                    if (_set_traits(start_pos, maze_generator.getStartDir, 3000))
                    {
                        break;
                    }
                }

                maze_generator = new MazeGenerator();
                _init_roomtraits();
            }
            return(maze_generator.getCriticalPath);
        }
        List<maze_move> _create_critical_path(int crit_path_min, int crit_path_max)
        {
            while (true)
            {
                maze_generator.setSize(width, height);
                _set_random_path_position();
                if (maze_generator.generateCriticalPath(dungeon_structure.MT_maze, crit_path_min, crit_path_max))
                {
                    start_pos = maze_generator.getStartPosition;
                    if (_set_traits(start_pos, maze_generator.getStartDir, 3000))
                        break;
                }

                maze_generator = new MazeGenerator();
                _init_roomtraits();
            }
            return maze_generator.getCriticalPath;
        }