Skip to main content

FrequencyTimerDefinition

A class in Root.Township, Alta.Populations.

Population timer asset that checks each population every tickTime seconds on the Timeline.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private float elementDecayTimeSeconds a spawned element lasts.
private Dictionary<GlobalPopulationDefinition, Timeline.IEntry> entriesThe timeline entry for each population.
private float tickTimeSeconds between population checks.

Properties​

MemberWhat it is
override float ElementDecayTime { get; }Seconds before a spawned element decays, from elementDecayTime.
override bool SpawnOnInitialize { get; }Always true: populations spawn when they initialize.

Methods​

MemberWhat it is
override void Clean(GlobalPopulationDefinition population)Cancels the population's repeating timeline entry.
override void Setup(GlobalPopulationDefinition population)Starts (or restarts) a repeating CheckSpawned call for the population every tickTime seconds.