Class AreaFinder
Finds the distinct areas in the boolean grid view specified, and adds them to the item list with the tag specified.
Inherited Members
Namespace: GoRogue.MapGeneration.Steps
Assembly: GoRogue.dll
Syntax
public class AreaFinder : GenerationStep
Constructors
View SourceAreaFinder(string?, string?, string?)
Creates a new AreaFinder generation step.
Declaration
public AreaFinder(string? name = null, string? gridViewComponentTag = "WallFloor", string? areasComponentTag = "Areas")
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the generation step. Defaults to AreaFinder |
string | gridViewComponentTag | Optional tag that must be associated with the grid view used to find areas. Defaults to "WallFloor". |
string | areasComponentTag | Optional tag that must be associated with the component used to store areas found by this algorithm. Defaults to "Areas". |
Fields
View SourceAdjacencyMethod
The adjacency method to use for determining whether two locations are in the same area.
Declaration
public AdjacencyRule AdjacencyMethod
Field Value
Type | Description |
---|---|
AdjacencyRule |
AreasComponentTag
Optional tag that must be associated with the component used to store areas found by this algorithm.
Declaration
public readonly string? AreasComponentTag
Field Value
Type | Description |
---|---|
string |
GridViewComponentTag
Optional tag that must be associated with the grid view used to find areas.
Declaration
public readonly string? GridViewComponentTag
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> |