Skip to main content

SpawnModifiers

A class in Root.Township, Alta.Forests.

Lists of modifiers that forest fill runs on a spawn candidate at each stage (point, point with normal, spawn parameters, spawned entity). Each can adjust the candidate and lower its score.

Constructors​

MemberWhat it is
SpawnModifiers()Creates a SpawnModifiers with default values.

Fields​

4 private and internal fields
MemberWhat it is
private NetworkEntityModifiers[] networkEntityModifiersModifiers that score a spawned entity. Not initialized by Initialize.
private SpawnModifierPoint[] pointModifiersModifiers that filter and score a spawn point on an edge.
private SpawnModifierPointNormal[] pointNormalModifiersModifiers that filter and score a spawn point with a normal.
private SpawnModifierSpawnParameters[] spawnParameterModifiersModifiers that adjust and score the spawn parameters.

Methods​

MemberWhat it is
void Initialize()Initializes the point, point normal and spawn parameter modifiers.
bool Process(ForestFillCore.Setup setup, ref PointEdge point, float score, ref float currentScore)Runs this stage's modifiers on the candidate. Returns false once the score drops to the threshold; hands off if a modifier switched the setup's modifiers.
bool Process(ForestFillCore.Setup setup, ref PointNormal point, float score, ref float currentScore)Runs this stage's modifiers on the candidate. Returns false once the score drops to the threshold; hands off if a modifier switched the setup's modifiers.
bool Process(ForestFillCore.Setup setup, ref SpawnParameters parameters, float score, ref float currentScore)Runs this stage's modifiers on the candidate. Returns false once the score drops to the threshold; hands off if a modifier switched the setup's modifiers.
bool Process(ForestFillCore.Setup setup, NetworkEntity entity, float score, ref float currentScore)Runs this stage's modifiers on the candidate. Returns false once the score drops to the threshold; hands off if a modifier switched the setup's modifiers.

Used in​

Members of other types that take, return or hold a SpawnModifiers: