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
AreaFinder(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
AdjacencyMethod
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
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> |