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.
- Listed in World generation
- Derived types
PaintModifiers
Constructors
| Member | What it is |
|---|---|
SpawnModifiers() | Creates a SpawnModifiers with default values. |
Fields
4 private and internal fields
| Member | What it is |
|---|---|
private NetworkEntityModifiers[] networkEntityModifiers | Modifiers that score a spawned entity. Not initialized by Initialize. |
private SpawnModifierPoint[] pointModifiers | Modifiers that filter and score a spawn point on an edge. |
private SpawnModifierPointNormal[] pointNormalModifiers | Modifiers that filter and score a spawn point with a normal. |
private SpawnModifierSpawnParameters[] spawnParameterModifiers | Modifiers that adjust and score the spawn parameters. |
Methods
| Member | What 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: