Class RoomDoors
A list of openings in room walls, categorized by side they're on. Typically created via a DoorList.
Inherited Members
Namespace: GoRogue.MapGeneration.ContextComponents
Assembly: GoRogue.dll
Syntax
public class RoomDoors : IEnumerable<ItemStepPair<Point>>, IEnumerable
Constructors
View SourceRoomDoors(Rectangle)
Creates a new list of doors for a given room.
Declaration
public RoomDoors(Rectangle room)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | room | The room having its doors tracked. |
Properties
View SourceBottomDoors
Positions of doors on the bottom wall of the room.
Declaration
public IReadOnlyList<Point> BottomDoors { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Point> |
DoorToStepMapping
A dictionary associating doors with the generation step that recorded/created them.
Declaration
public IReadOnlyDictionary<Point, string> DoorToStepMapping { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<Point, string> |
Doors
Positions all doors in all walls of the room, with no duplicate locations.
Declaration
public IEnumerable<Point> Doors { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Point> |
this[Direction]
Retrieves a read-only list of doors on the given side. Direction specified must be a cardinal.
Declaration
public IReadOnlyList<Point> this[Direction side] { get; }
Parameters
Type | Name | Description |
---|---|---|
Direction | side | Side to get doors for. |
Property Value
Type | Description |
---|---|
IReadOnlyList<Point> | A read-only list of doors on the given side. |
LeftDoors
Positions of doors on the bottom wall of the room.
Declaration
public IReadOnlyList<Point> LeftDoors { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Point> |
RightDoors
Positions of doors on the right wall of the room.
Declaration
public IReadOnlyList<Point> RightDoors { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Point> |
Room
The room that is having its doors tracked.
Declaration
public Rectangle Room { get; }
Property Value
Type | Description |
---|---|
Rectangle |
RoomWithOuterWalls
A rectangle including the outer walls of the room having its doors tracked.
Declaration
public Rectangle RoomWithOuterWalls { get; }
Property Value
Type | Description |
---|---|
Rectangle |
TopDoors
Positions of doors on the top wall of the room.
Declaration
public IReadOnlyList<Point> TopDoors { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Point> |
Methods
View SourceAddDoor(string, Point)
Adds the given position to the appropriate lists of doors.
Declaration
public void AddDoor(string generationStepName, Point doorPosition)
Parameters
Type | Name | Description |
---|---|---|
string | generationStepName | The name of the generation step that is adding the door. |
Point | doorPosition | Position to add. |
AddDoors(string, params Point[])
Adds the given positions to the appropriate lists of doors.
Declaration
public void AddDoors(string generationStepName, params Point[] doorPositions)
Parameters
Type | Name | Description |
---|---|---|
string | generationStepName | The name of the generation step that is adding the doors. |
Point[] | doorPositions | Positions to add. |
AddDoors(string, IEnumerable<Point>)
Adds the given positions to the appropriate lists of doors.
Declaration
public void AddDoors(string generationStepName, IEnumerable<Point> doorPositions)
Parameters
Type | Name | Description |
---|---|---|
string | generationStepName | The name of the generation step that is adding the doors. |
IEnumerable<Point> | doorPositions | Positions to add. |
GetEnumerator()
Gets an enumerator for all doors recorded and the step that added them.
Declaration
public IEnumerator<ItemStepPair<Point>> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<ItemStepPair<Point>> |