Skip to main content

ForestEncounters

A class in Root.Township, Alta.Forests.

Forest generation step that places encounter generation cores (GCores) on paths, large clearings, crossroads and dead ends.

Constructors​

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

Fields​

6 private and internal fields
MemberWhat it is
private ObjectPipeline crossRoadsCores for nodes with more than two paths.
private ObjectPipeline deadEndsCores for nodes with one path.
private EdgeType edgeTypeEdge types that get path encounters.
private float largeEncounterRadiusThresholdNodes larger than this get a large encounter instead.
private ObjectPipeline largeEncountersCores for large nodes.
private ObjectPipeline pathsCores placed along edges, facing along them.

Methods​

MemberWhat it is
void Initialize()Does nothing.
6 private and internal methods
MemberWhat it is
private void Alta.Forests.IForestGeneration.ClearDynamic(LocationChunk chunk)Does nothing.
private void Alta.Forests.IForestGeneration.ClearStatic(LocationChunk chunk)Does nothing.
private void EditorPreview()Context menu: spawns every encounter core in a row with labels, to preview them.
private async Task Alta.Forests.IForestGeneration.GenerateDynamic(ForestGeneration forest, LocationChunk chunk)Does nothing.
private Task Alta.Forests.IForestGeneration.GenerateGlobal(ForestGeneration forest)Does nothing.
private async Task Alta.Forests.IForestGeneration.GenerateStatic(ForestGeneration forest, LocationChunk chunk, InstructionSet instructions)Adds GCore instructions for matching edges and for nodes by size and number of paths. Entrances and open spaces are skipped.