PopulationTimerDefinition
An abstract class in Root.Township, Alta.Populations.
Base class for the timer that drives a GlobalPopulationDefinition: decides when it ticks and how long spawned elements last.
- Listed in World generation
- Inherits or implements
ScriptableObject - Derived types
DayNightOnlyTimerDefinition,FrequencyTimerDefinition - Documented in Populations and spawners
Constructors
| Member | What it is |
|---|---|
protected PopulationTimerDefinition() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Properties
| Member | What it is |
|---|---|
abstract float ElementDecayTime { get; } | How long each spawned element lasts, passed to every SpawnedElement. |
abstract bool SpawnOnInitialize { get; } | If true, the population spawns its starting amount at start-up. |
Methods
| Member | What it is |
|---|---|
abstract void Clean(GlobalPopulationDefinition population) | Called from the population's Clean; stops the timer for it. |
abstract void Setup(GlobalPopulationDefinition population) | Called from the population's StartUp; starts the timer for it. |
Used in
Members of other types that take, return or hold a PopulationTimerDefinition: