Show / Hide Table of Contents

Class RandomViewFill

Randomly fills a boolean IGridView<T> with true/false values. Creates a grid view with the given tag if none is present.

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

Constructors

RandomViewFill(String, String)

Creates a new step for applying random values to a map view.

Declaration
public RandomViewFill(string name = null, string gridViewComponentTag = "WallFloor")
Parameters
Type Name Description
String name

The name of the generation step. Defaults to RandomViewFill.

String gridViewComponentTag

Optional tag that must be associated with the grid view that random values are set to. Defaults to "WallFloor".

Fields

ExcludePerimeterPoints

Whether or not to exclude the perimeter points from the random fill.

Declaration
public bool ExcludePerimeterPoints
Field Value
Type Description
Boolean

FillProbability

Represents the percent chance that a given cell will be a floor cell when the map is initially randomly filled.

Declaration
public float FillProbability
Field Value
Type Description
Single

FillsBetweenPauses

How many squares to fill before yield returning for a pause. Defaults to no pauses (0).

Declaration
public uint FillsBetweenPauses
Field Value
Type Description
UInt32

GridViewComponentTag

Optional tag that must be associated with the grid view that random values are set to.

Declaration
public readonly string GridViewComponentTag
Field Value
Type Description
String

RNG

The RNG to use for filling the view.

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

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