Add this class to a character or object with a Health class, and its health will auto refill based on the settings here
More...
Add this class to a character or object with a Health class, and its health will auto refill based on the settings here
◆ RefillModes
the possible refill modes :
- linear : constant health refill at a certain rate per second
- bursts : periodic bursts of health
◆ Awake()
virtual void MoreMountains.CorgiEngine.HealthAutoRefill.Awake |
( |
| ) |
|
|
protectedvirtual |
◆ Initialization()
virtual void MoreMountains.CorgiEngine.HealthAutoRefill.Initialization |
( |
| ) |
|
|
protectedvirtual |
On init we grab our Health component
◆ OnDisable()
virtual void MoreMountains.CorgiEngine.HealthAutoRefill.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On disable we stop listening for hits
◆ OnEnable()
virtual void MoreMountains.CorgiEngine.HealthAutoRefill.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable we start listening for hits
◆ OnHit()
virtual void MoreMountains.CorgiEngine.HealthAutoRefill.OnHit |
( |
| ) |
|
|
virtual |
◆ ProcessRefillHealth()
virtual void MoreMountains.CorgiEngine.HealthAutoRefill.ProcessRefillHealth |
( |
| ) |
|
|
protectedvirtual |
Tests if a refill is needed and processes it
◆ Update()
virtual void MoreMountains.CorgiEngine.HealthAutoRefill.Update |
( |
| ) |
|
|
protectedvirtual |
◆ _health
Health MoreMountains.CorgiEngine.HealthAutoRefill._health |
|
protected |
◆ _healthToGive
float MoreMountains.CorgiEngine.HealthAutoRefill._healthToGive = 0f |
|
protected |
◆ _lastBurstTimestamp
float MoreMountains.CorgiEngine.HealthAutoRefill._lastBurstTimestamp |
|
protected |
◆ _lastHitTime
float MoreMountains.CorgiEngine.HealthAutoRefill._lastHitTime = 0f |
|
protected |
◆ CooldownAfterHit
float MoreMountains.CorgiEngine.HealthAutoRefill.CooldownAfterHit = 1f |
how much time, in seconds, should pass before the refill kicks in
◆ DurationBetweenBursts
float MoreMountains.CorgiEngine.HealthAutoRefill.DurationBetweenBursts = 2f |
the duration between two health bursts, in seconds
◆ HealthPerBurst
float MoreMountains.CorgiEngine.HealthAutoRefill.HealthPerBurst = 5 |
the amount of health to restore per burst when in burst mode
◆ HealthPerSecond
float MoreMountains.CorgiEngine.HealthAutoRefill.HealthPerSecond |
the amount of health per second to restore when in linear mode
◆ RefillHealth
bool MoreMountains.CorgiEngine.HealthAutoRefill.RefillHealth = true |
if this is true, health will refill itself when not at full health
◆ RefillMode
RefillModes MoreMountains.CorgiEngine.HealthAutoRefill.RefillMode |
The documentation for this class was generated from the following file: