Skip to main content

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.

Constructors​

MemberWhat it is
protected PopulationTimerDefinition()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Properties​

MemberWhat 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​

MemberWhat 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: