BasicEcosystem
A class in Root.Township, Alta.Populations.
Server: per chunk lookup of the BasicPopulations registered in a location chunk, keyed by their PopulationSetup. Reached through the chunk's Environment.Ecosystem.
- Listed in World generation
- Inherits or implements
NetworkEntityBehaviour - Attributes
RequireComponent - Documented in Populations and spawners
Constructors
| Member | What it is |
|---|---|
BasicEcosystem() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private static Logger logger | Private: logs double registrations. |
private Dictionary<PopulationSetup, BasicPopulation> populations | Private: registered populations by PopulationSetup. |
Methods
| Member | What it is |
|---|---|
void Add(BasicPopulation population) | Registers a population under its definition. A second one with the same definition is refused with an error. |
BasicPopulation Get(PopulationSetup setup) | Returns the population for a setup in this chunk, or null. |
void Remove(BasicPopulation population) | Removes the population registered under its definition. |
Used in
Members of other types that take, return or hold a BasicEcosystem: