Skip to main content

HeatPointTriggerCollector

A class in Root.Township, the global namespace.

Trigger helper for a temperature check skill input. Counts hot HeatArea colliders inside it and toggles the input active after a set time.

Constructors​

MemberWhat it is
HeatPointTriggerCollector()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

6 private and internal fields
MemberWhat it is
private TemperatureCheckInput inputMethodThe temperature check input that gets set active.
private TemperatureCheckInputStructure structureThe input structure with the minimum temperature, activation time and active time.
private float timerTime left until the next toggle.
private IUnityUpdateMethod updateRegistered late update method while timing.
private static UpdateModule updateModuleShared late update module.
private HashSet<Collider> validCollidersHot heat area colliders currently inside the trigger.

Methods​

MemberWhat it is
void InitializeValues(TemperatureCheckInputStructure structure, TemperatureCheckInput inputMethod)Sets the input structure (thresholds and times) and the input method to toggle.
void ResetTime()With no hot colliders inside, resets the timer and stops updating.
3 private and internal methods
MemberWhat it is
private void OnTriggerEnter(Collider other)When the first heat area above the minimum temperature enters, starts the activation timer.
private void OnTriggerExit(Collider other)When the last hot collider leaves and the input is not active, stops the timer.
private void UpdateCount()Late update: counts the timer down, then activates the input, or deactivates it once its active time runs out.

Used in​

Members of other types that take, return or hold a HeatPointTriggerCollector: