Class OrderedMapAreaConnection
Connects areas of the map by connecting each area specified to a random other area, or connecting the areas in a specific order specified.
Inherited Members
Namespace: GoRogue.MapGeneration.Steps
Assembly: GoRogue.dll
Syntax
public class OrderedMapAreaConnection : GenerationStep
Constructors
View SourceOrderedMapAreaConnection(string?, string?, string?, string?)
Creates a new ordered area connection step.
Declaration
public OrderedMapAreaConnection(string? name = null, string? wallFloorComponentTag = "WallFloor", string? areasComponentTag = "Areas", string? tunnelsComponentTag = "Tunnels")
Parameters
Type | Name | Description |
---|---|---|
string | name |
|
string | wallFloorComponentTag | Optional tag that must be associated with the map view component used to store/set floor/wall status. Defaults to "WallFloor". |
string | areasComponentTag | Optional tag that must be associated with the component used to store map areas connected by this algorithm. Defaults to "Areas". |
string | tunnelsComponentTag | Optional tag that must be associated with the component created/used to store the tunnels created by this connection method. Defaults to "Tunnels". |
Fields
View SourceAreasComponentTag
Optional tag that must be associated with the component used to store map areas connected by this algorithm.
Declaration
public readonly string? AreasComponentTag
Field Value
Type | Description |
---|---|
string |
ConnectionPointSelector
The area connection strategy to use. Not all methods function on maps with concave areas -- see respective class documentation for details.
Declaration
public IConnectionPointSelector ConnectionPointSelector
Field Value
Type | Description |
---|---|
IConnectionPointSelector |
RNG
RNG to use for randomization or room order (if randomization is enabled).
Declaration
public IEnhancedRandom RNG
Field Value
Type | Description |
---|---|
IEnhancedRandom |
RandomizeOrder
Whether or not to randomize the order of the areas before connecting them. If false, the areas will be connected to the next area in the list specified by AreasComponentTag.
Declaration
public bool RandomizeOrder
Field Value
Type | Description |
---|---|
bool |
TunnelCreator
The tunnel creation strategy to use. Defaults to HorizontalVerticalTunnelCreator using DefaultRNG.
Declaration
public ITunnelCreator TunnelCreator
Field Value
Type | Description |
---|---|
ITunnelCreator |
TunnelsComponentTag
Optional tag that must be associated with the component created/used to store the tunnels created by this connection method.
Declaration
public readonly string? TunnelsComponentTag
Field Value
Type | Description |
---|---|
string |
WallFloorComponentTag
Optional tag that must be associated with the component used to set wall/floor status of tiles changed by this algorithm.
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> |