![]() |
ManiaMap.Godot
Procedural generation of metroidvania style maps for Godot .NET.
|
Holds the current Layout and LayoutState.
More...
Public Member Functions | |
| bool | DoorExists (Uid id, Vector2DInt position, DoorDirection direction) |
| Returns true if the door exists for the specified cell index and direction. More... | |
| DoorConnection | FindDoorConnection (Uid id, Vector2DInt position, DoorDirection direction) |
| Returns the door connection with the given room ID, position, and direction if it exists. Returns null if the connection does not exist. More... | |
| IReadOnlyList< DoorConnection > | GetDoorConnections (Uid id) |
| Returns a list of door connections with a room for the specified room ID. If the room ID does not exist, returns an empty list. More... | |
| IEnumerable< int > | GetLayerCoordinates () |
| Returns an enumerable of unique layer (z) coordinates for the layout. The coordinates are not in any particular order. More... | |
| IReadOnlyList< DoorPosition > | GetRoomDoors (Uid id) |
| Returns a list of door positions for the specified room ID. If the room ID does not exist, returns an empty list. More... | |
| IReadOnlyList< Room > | GetRoomsInLayer (int z) |
| Returns a list of rooms corresponding to the specified layer (z) coordinate. If the layer does not exist, returns an empty list. More... | |
| LayoutPack (Layout layout, LayoutState state, ManiaMapSettings settings=null) | |
| Initializes a new layout pack. More... | |
| LayoutPack (Layout layout, LayoutState state, string settingsPath) | |
| Initializes a new layout pack. More... | |
Properties | |
| Layout | Layout [get] |
| The layout. More... | |
| LayoutState | LayoutState [get] |
| The layout state. More... | |
| Dictionary< Uid, List< DoorConnection > > | RoomConnections = new Dictionary<Uid, List<DoorConnection>>() [get] |
| A dictionary of door connections by room ID. More... | |
| Dictionary< Uid, List< DoorPosition > > | RoomDoors = new Dictionary<Uid, List<DoorPosition>>() [get] |
| A dictionary of door positions by room ID. More... | |
| Dictionary< int, List< Room > > | RoomsByLayer = new Dictionary<int, List<Room>>() [get] |
| A dictionary of rooms by layer coordinate. More... | |
| ManiaMapSettings | Settings [get] |
| The settings. More... | |
Holds the current Layout and LayoutState.
Definition at line 12 of file LayoutPack.cs.
| LayoutPack | ( | Layout | layout, |
| LayoutState | state, | ||
| string | settingsPath | ||
| ) |
Initializes a new layout pack.
| layout | The layout. |
| state | The layout state. |
| settingsPath | The path to the ManiaMapSettings resource. |
Definition at line 50 of file LayoutPack.cs.
| LayoutPack | ( | Layout | layout, |
| LayoutState | state, | ||
| ManiaMapSettings | settings = null |
||
| ) |
Initializes a new layout pack.
| layout | The layout. |
| state | The layout state. |
| settings | The settings resource. If null, a new default instance of the settings will be used. |
| ArgumentNullException | Thrown if the layout or layout state is null. |
| ArgumentException | Thrown if the layout and layout state ID's do not match. |
Definition at line 64 of file LayoutPack.cs.
| bool DoorExists | ( | Uid | id, |
| Vector2DInt | position, | ||
| DoorDirection | direction | ||
| ) |
Returns true if the door exists for the specified cell index and direction.
| id | The room ID. |
| position | The cell index in the room. |
| direction | The door direction. |
Definition at line 122 of file LayoutPack.cs.
| DoorConnection FindDoorConnection | ( | Uid | id, |
| Vector2DInt | position, | ||
| DoorDirection | direction | ||
| ) |
Returns the door connection with the given room ID, position, and direction if it exists. Returns null if the connection does not exist.
| id | The room ID. |
| position | The cell position index. |
| direction | The door direction. |
Definition at line 149 of file LayoutPack.cs.
| IReadOnlyList< DoorConnection > GetDoorConnections | ( | Uid | id | ) |
Returns a list of door connections with a room for the specified room ID. If the room ID does not exist, returns an empty list.
| id | The room ID. |
Definition at line 85 of file LayoutPack.cs.
| IEnumerable< int > GetLayerCoordinates | ( | ) |
Returns an enumerable of unique layer (z) coordinates for the layout. The coordinates are not in any particular order.
Definition at line 137 of file LayoutPack.cs.
| IReadOnlyList< DoorPosition > GetRoomDoors | ( | Uid | id | ) |
Returns a list of door positions for the specified room ID. If the room ID does not exist, returns an empty list.
| id | The room ID. |
Definition at line 109 of file LayoutPack.cs.
| IReadOnlyList< Room > GetRoomsInLayer | ( | int | z | ) |
Returns a list of rooms corresponding to the specified layer (z) coordinate. If the layer does not exist, returns an empty list.
| z | The layer coordinate. |
Definition at line 97 of file LayoutPack.cs.
|
get |
The layout.
Definition at line 17 of file LayoutPack.cs.
|
get |
The layout state.
Definition at line 22 of file LayoutPack.cs.
|
getprivate |
A dictionary of door connections by room ID.
Definition at line 32 of file LayoutPack.cs.
|
getprivate |
A dictionary of door positions by room ID.
Definition at line 42 of file LayoutPack.cs.
|
getprivate |
A dictionary of rooms by layer coordinate.
Definition at line 37 of file LayoutPack.cs.
|
get |
The settings.
Definition at line 27 of file LayoutPack.cs.