HeatManager
A class in Root.Township, Alta.Heat.
Server: burns a HealthObject with fire damage while any heat point in its HeatPointCollection is hot. Used on creatures and other things that take fire damage.
- Listed in Stats, effects, heat and liquid
- Inherits or implements
MonoBehaviour - Nested types
HeatPointDamageLevel - Documented in Heat
Constructors
| Member | What it is |
|---|---|
HeatManager() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
8 private and internal fields
| Member | What it is |
|---|---|
private float burnDamageThreshold | Temperature above which a heat point counts as hot and deals the small burningTickDamage when it rises. |
private float burningTickDamage | Damage per update for each hot (but not ignited) heat point whose temperature went up. |
private HeatPointCollection collection | The heat points that are checked for burning. |
private static DamageData damageData | Shared damage info with source Fire, used for every burn hit. |
private AnimationCurve damagePerTemperature | Curve from temperature to damage per update for heat points past the ignition threshold. |
private HealthObject damageTarget | The HealthObject that takes the fire damage. |
private List<HeatManager.HeatPointDamageLevel> heatPointLevels | Per heat point burn level trackers (none, hot or ignited), built on the server. |
private float ignitionThreshold | Temperature above which a heat point counts as ignited and deals curve damage. |
Methods
5 private and internal methods
| Member | What it is |
|---|---|
private void BurnUpdate(StatManager manager) | Runs on each stat update while something is hot. Deals fire damage from the temperature curve for ignited points, or a small tick for warming points. |
private void Initialize(NetworkEntity entity) | Server: once the entity is initialized, tracks each heat point's burn level and hooks the stat manager's reset. |
private void OnReset(StatManager manager) | When the target's stats reset, instantly extinguishes every heat point's heat source and resets the collection. |
private void Start() | Waits for the target entity to finish initializing, then calls Initialize. |
private void UpdateLevel(int level) | Called when a heat point's burn level changes. Subscribes BurnUpdate when the first point gets hot and removes it when none are. |