Show / Hide Table of Contents

Class DoorFinder

Finds the locations of open walls in rectangular rooms that constitute doorways.

Inheritance
Object
GenerationStep
DoorFinder
Inherited Members
GenerationStep.Name
GenerationStep.PerformStep(GenerationContext)
GenerationStep.GetStageEnumerator(GenerationContext)
GenerationStep.RequiredComponents
Namespace: GoRogue.MapGeneration.Steps
Assembly: GoRogue.dll
Syntax
public class DoorFinder : GenerationStep

Constructors

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

DoorsListComponentTag

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

OnPerform(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>
Overrides
GenerationStep.OnPerform(GenerationContext)

Extension Methods

Utility.Yield<T>(T)
In This Article
Back to top Generated by DocFX