Show / Hide Table of Contents

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.

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

Constructors

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

The name of the generation step. Defaults to OrderedMapAreaConnection.

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

AreasComponentTag

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

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
Boolean

RNG

RNG to use for randomization or room order (if randomization is enabled).

Declaration
public IEnhancedRandom RNG
Field Value
Type Description
ShaiRandom.Generators.IEnhancedRandom

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

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