Add this class to a character or object with a Health class, and its health will auto refill based on the settings here.
More...
|
| virtual void | OnHit () |
| | On hit we store our time.
|
|
| virtual void | Awake () |
| | On Awake we do our init.
|
| virtual void | Initialization () |
| | On init we grab our Health component.
|
| virtual void | Update () |
| | On Update we refill.
|
| virtual void | ProcessRefillHealth () |
| | Tests if a refill is needed and processes it.
|
| virtual void | OnEnable () |
| | On enable we start listening for hits.
|
| virtual void | OnDisable () |
| | On disable we stop listening for hits.
|
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.TopDownEngine.HealthAutoRefill.Awake |
( |
| ) |
|
|
protectedvirtual |
◆ Initialization()
| virtual void MoreMountains.TopDownEngine.HealthAutoRefill.Initialization |
( |
| ) |
|
|
protectedvirtual |
On init we grab our Health component.
◆ OnDisable()
| virtual void MoreMountains.TopDownEngine.HealthAutoRefill.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On disable we stop listening for hits.
◆ OnEnable()
| virtual void MoreMountains.TopDownEngine.HealthAutoRefill.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable we start listening for hits.
◆ OnHit()
| virtual void MoreMountains.TopDownEngine.HealthAutoRefill.OnHit |
( |
| ) |
|
|
virtual |
On hit we store our time.
◆ ProcessRefillHealth()
| virtual void MoreMountains.TopDownEngine.HealthAutoRefill.ProcessRefillHealth |
( |
| ) |
|
|
protectedvirtual |
Tests if a refill is needed and processes it.
◆ Update()
| virtual void MoreMountains.TopDownEngine.HealthAutoRefill.Update |
( |
| ) |
|
|
protectedvirtual |
◆ _health
| Health MoreMountains.TopDownEngine.HealthAutoRefill._health |
|
protected |
◆ _healthToGive
| float MoreMountains.TopDownEngine.HealthAutoRefill._healthToGive = 0f |
|
protected |
◆ _lastBurstTimestamp
| float MoreMountains.TopDownEngine.HealthAutoRefill._lastBurstTimestamp |
|
protected |
◆ _lastHitTime
| float MoreMountains.TopDownEngine.HealthAutoRefill._lastHitTime = 0f |
|
protected |
◆ CooldownAfterHit
| float MoreMountains.TopDownEngine.HealthAutoRefill.CooldownAfterHit = 1f |
how much time, in seconds, should pass before the refill kicks in
◆ DurationBetweenBursts
| float MoreMountains.TopDownEngine.HealthAutoRefill.DurationBetweenBursts = 2f |
the duration between two health bursts, in seconds
◆ HealthPerBurst
| float MoreMountains.TopDownEngine.HealthAutoRefill.HealthPerBurst = 5 |
the amount of health to restore per burst when in burst mode
◆ HealthPerSecond
| float MoreMountains.TopDownEngine.HealthAutoRefill.HealthPerSecond |
the amount of health per second to restore when in linear mode
◆ RefillHealth
| bool MoreMountains.TopDownEngine.HealthAutoRefill.RefillHealth = true |
if this is true, health will refill itself when not at full health
◆ RefillMode
| RefillModes MoreMountains.TopDownEngine.HealthAutoRefill.RefillMode |
◆ TargetHealth
| Health MoreMountains.TopDownEngine.HealthAutoRefill.TargetHealth |
an optional target Health component to refill
The documentation for this class was generated from the following file:
- H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/Common/Scripts/Characters/Health/HealthAutoRefill.cs