Skip to main content

Decay

A class in Root.Township, Alta.PAGaC.

PAGaC generation step that turns cells to air using 3D simplex noise, with more decay higher up, to make structures look ruined.

Constructors​

MemberWhat it is
Decay()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

4 private and internal fields
MemberWhat it is
private float decayLimitThreshold above which a cell is removed.
private float extraDecayWithHeightAdded to the noise per cell of height.
private float noiseMultiplierScales the noise value.
private float noiseScaleScales cell coordinates before sampling noise.

Methods​

MemberWhat it is
override void Run(GenerationBase generationBase)Sets every cell whose scaled noise plus height bonus is over decayLimit to the air tag, with a fresh random noise seed.