Clear previously captured snapshots.
Sets the map values to match a given table. A shallow copy is made from the given table.
Creates rooms given the current BSP Tree. Use the 'split' method first to generate areas, then call createRooms to generate rooms within those areas
Options to create the rooms
The maximum height of a generated room. Will never be taller than the BSP area.
The maximum width of a generated room. Will never be wider than the BSP area.
The minimum height of a generated room.
The minimum width of a generated room.
Can pad the area to ensure rooms aren't against the boundaries. Default 0.
Creates simple right angle hallways between existing rooms.
BSPDungeon - Can be used for method chaining.
Returns a list of all hallways
Vector2[][] - The hallways
Returns the internal map.
Gets all rooms created. These will each belong to a leaf node of the BSP Tree.
Rect[] - A list of all rooms
Returns previously captured snapshots.
Splits the dungeon n times. A count of 1 would divide the dungeon in two, count of 2 divides it in 4, etc.
number
Takes a snapshot of the current map state. These can be retrieved through getSnapshots()
Generated using TypeDoc
DungeonGenerator creates a number of rooms, and then works to connect them.