Third Person Cover Shooter
1.6
|
Manages health and sets Is Alive in Character Motor to false when it reaches 0. More...
Public Member Functions | |
void | OnResurrect () |
Catch the resurrection event and remember that the character is alive. More... | |
void | OnDead () |
Catch the death event, set health to zero and remember that the character is dead now. More... | |
void | OnTakenHit (Hit hit) |
Reduce health on bullet hit. More... | |
void | Heal (float amount) |
Heals by some amount. More... | |
void | Deal (float amount) |
Deals a specific amount of damage. More... | |
Static Public Member Functions | |
static CharacterHealth | Get (GameObject gameObject) |
static bool | Contains (GameObject gameObject) |
Public Attributes | |
float | Health = 100f |
Current health of the character. More... | |
float | MaxHealth = 100f |
Max health to regenerate to. More... | |
float | Regeneration = 0f |
Amount of health regenerated per second. More... | |
float | DamageMultiplier = 1 |
How much the incoming damage is multiplied by. More... | |
bool | IsTakingDamage = true |
Does the component reduce damage on hits. More... | |
bool | IsRegisteringHits = true |
Are bullet hits done to the main collider registered as damage. More... | |
Action | Died |
Executed on death. More... | |
Action< float > | Hurt |
Executed after being hurt. More... | |
Action< float > | Healed |
Executed after being healed by any amount. More... | |
Action< float > | Changed |
Executed after any health change. More... | |
Manages health and sets Is Alive in Character Motor to false when it reaches 0.
Registers damage done by bullets. Multiple hitboxes can be setup inside the character. On setup Character Health will stop registering hits and instead will expect child Body Part Health components to pass taken damage to it.
|
static |
void CoverShooter.CharacterHealth.Deal | ( | float | amount | ) |
Deals a specific amount of damage.
|
static |
void CoverShooter.CharacterHealth.Heal | ( | float | amount | ) |
Heals by some amount.
void CoverShooter.CharacterHealth.OnDead | ( | ) |
Catch the death event, set health to zero and remember that the character is dead now.
Implements CoverShooter.ICharacterHealthListener.
void CoverShooter.CharacterHealth.OnResurrect | ( | ) |
Catch the resurrection event and remember that the character is alive.
Implements CoverShooter.ICharacterHealthListener.
void CoverShooter.CharacterHealth.OnTakenHit | ( | Hit | hit | ) |
Reduce health on bullet hit.
Action<float> CoverShooter.CharacterHealth.Changed |
Executed after any health change.
float CoverShooter.CharacterHealth.DamageMultiplier = 1 |
How much the incoming damage is multiplied by.
Action CoverShooter.CharacterHealth.Died |
Executed on death.
Action<float> CoverShooter.CharacterHealth.Healed |
Executed after being healed by any amount.
float CoverShooter.CharacterHealth.Health = 100f |
Current health of the character.
Action<float> CoverShooter.CharacterHealth.Hurt |
Executed after being hurt.
bool CoverShooter.CharacterHealth.IsRegisteringHits = true |
Are bullet hits done to the main collider registered as damage.
bool CoverShooter.CharacterHealth.IsTakingDamage = true |
Does the component reduce damage on hits.
Usually used for debugging purposes to make immortal characters.
float CoverShooter.CharacterHealth.MaxHealth = 100f |
Max health to regenerate to.
float CoverShooter.CharacterHealth.Regeneration = 0f |
Amount of health regenerated per second.