Show / Hide Table of Contents

Class RoomDoors

A list of openings in room walls, categorized by side they're on. Typically created via a DoorList.

Inheritance
object
RoomDoors
Implements
IEnumerable<ItemStepPair<Point>>
IEnumerable
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: GoRogue.MapGeneration.ContextComponents
Assembly: GoRogue.dll
Syntax
public class RoomDoors : IEnumerable<ItemStepPair<Point>>, IEnumerable

Constructors

View Source

RoomDoors(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 Source

BottomDoors

Positions of doors on the bottom wall of the room.

Declaration
public IReadOnlyList<Point> BottomDoors { get; }
Property Value
Type Description
IReadOnlyList<Point>
View Source

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>
View Source

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>
View Source

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.

View Source

LeftDoors

Positions of doors on the bottom wall of the room.

Declaration
public IReadOnlyList<Point> LeftDoors { get; }
Property Value
Type Description
IReadOnlyList<Point>
View Source

RightDoors

Positions of doors on the right wall of the room.

Declaration
public IReadOnlyList<Point> RightDoors { get; }
Property Value
Type Description
IReadOnlyList<Point>
View Source

Room

The room that is having its doors tracked.

Declaration
public Rectangle Room { get; }
Property Value
Type Description
Rectangle
View Source

RoomWithOuterWalls

A rectangle including the outer walls of the room having its doors tracked.

Declaration
public Rectangle RoomWithOuterWalls { get; }
Property Value
Type Description
Rectangle
View Source

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 Source

AddDoor(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.

View Source

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.

View Source

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.

View Source

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>>

Implements

IEnumerable<T>
IEnumerable

Extension Methods

Utility.Yield<T>(T)
  • View Source
In this article
Back to top Generated by DocFX