A class in Root.Township, Alta.Forests.
Server: gives a population spawn points along a forest's paths in the chunk it is added to.
Constructors
| Member | What it is |
|---|
ForestPopulationArea() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private LocationChunk chunk | The chunk the points must fall in. |
private IEnumerable<Edge> edges | Forest edges in the chunk. |
private EdgeType edgeType | Edge types points can be placed on. |
private ForestGenerator forest | Unused. |
private LayerMask groundLayers | Layers the ground raycast hits. |
Methods
| Member | What it is |
|---|
override void InitializeAsServer(SpawnData spawnData) | Server: waits to be added to a chunk to collect its edges. |
2 private and internal methods
| Member | What it is |
|---|
private void GetForest(Chunk chunk) | When added to a chunk, collects the forest edges in that chunk. |
private PointNormal? Alta.Populations.IPointNormalEvaluator.GetPoint() | Picks a random point along a matching edge (weighted by length), raycasts down to the ground and returns it, or null. |