Class DoorFinder
Finds the locations of open walls in rectangular rooms that constitute doorways.
Inherited Members
Namespace: GoRogue.MapGeneration.Steps
Assembly: GoRogue.dll
Syntax
public class DoorFinder : GenerationStep
Constructors
View SourceDoorFinder(string?, string?, string?, string?)
Creates a door finder generation step.
Declaration
public DoorFinder(string? name = null, string? wallFloorComponentTag = "WallFloor", string? roomsComponentTag = "Rooms", string? doorsListComponentTag = "Doors")
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the generation step. Defaults to DoorFinder |
string | wallFloorComponentTag | Optional tag that must be associated with the grid view used to find whether room walls are open. Defaults to "WallFloor". |
string | roomsComponentTag | Optional tag that must be associated with the component used to store the rectangular rooms this algorithm finds openings for. Defaults to "Rooms". |
string | doorsListComponentTag | Optional tag that must be associated with the component created/used to record the door locations found by this algorithm. Defaults to "Doors". |
Fields
View SourceDoorsListComponentTag
Optional tag that must be associated with the component created/used to record the door locations found by this algorithm.
Declaration
public readonly string? DoorsListComponentTag
Field Value
Type | Description |
---|---|
string |
RoomsComponentTag
Optional tag that must be associated with the component used to store rectangular rooms that it generates door locations for.
Declaration
public readonly string? RoomsComponentTag
Field Value
Type | Description |
---|---|
string |
WallFloorComponentTag
Optional tag that must be associated with the grid view used to find openings in room walls.
Declaration
public readonly string? WallFloorComponentTag
Field Value
Type | Description |
---|---|
string |
Methods
View SourceOnPerform(GenerationContext)
Implement to perform the actual work of the generation step. Use "yield return null" to indicate the end of a "stage", eg. a point where execution can be paused when using GetStageEnumerator().
Declaration
protected override IEnumerator<object?> OnPerform(GenerationContext context)
Parameters
Type | Name | Description |
---|---|---|
GenerationContext | context | Context to perform the generation step on. |
Returns
Type | Description |
---|---|
IEnumerator<object> |