new DungeonMap(topX, topY, bottomX, bottomY)
the main class for generating and controlling maps
Parameters:
Name | Type | Description |
---|---|---|
topX |
number | top left bound |
topY |
number | top bound |
bottomX |
number | bottom right bound |
bottomY |
number | bottom bound |
Members
-
halls :Array.<Region>
-
halls
-
mapBounds
-
the region denoting the bounds of the map
-
maxPaddingBetweenRooms
-
the max padding between rooms
-
maxRoomsInDungeon
-
the maximum rooms in the dungeon
-
minPaddingBetweenRooms
-
the min padding between rooms
-
minRoomsInDungeon
-
the minimum rooms in the dungeon
-
roomSizeMax
-
the max size of a room (width or height)
-
roomSizeMin
-
the min size of a room (width or height)
-
rooms :Array.<Region>
-
all the rooms of the dungeon
Methods
-
_generateRandomRooms()
-
generate random rooms
-
generateRandomRooms()
-
generate random rooms