Dungeon class
Builds a dungeon map that consists of rooms connected by corridors, with doors where the corridors meet the rooms.
- Inheritance
-
- Object
- MapBuilder<
LevelTile> - Dungeon
Constructors
- Dungeon(int width, int height, {double targetDensity = 0.33, RoomConstraint roomWidths = const RoomConstraint(9, 15), RoomConstraint roomHeights = const RoomConstraint(5, 9), double maxAspectRatio = 3.0})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
map
→ TileMap<
LevelTile> -
The TileMap that was built by this builder
no setteroverride
- regions → RegionMap
-
Get the regions of the dungeon
no setter
- roomDensity → double
-
The density of open room tiles in the Dungeon
no setter
-
rooms
→ List<
Room> -
The list of rooms generated for this Dungeon
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
) → Iterable< String> -
Build the map. Recommend that implementations use synchronous generators
so that the building of complex maps can be driven incrementally by the
game loop. For example: place one room at a time for a dungeon map. The
string values emitted by the returned Iterable could be used to
dynamically update a loading screen.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited