Merlins Beard . Health System . Health

Serialized Fields

Max Health :: float
Health Changed :: Unity Event
Zero Health :: Unity Event
Damaged By :: Target . Target Event


Current Health :: float
Max Health :: float
Is Dead :: bool
Is Alive :: bool


Take Damage ( Amount :: float, Attacker :: Target )

Calls Take Damage and invokes the Damaged By event.

Take Damage ( Amount :: float )

Subtracts the damage amount from the current health and invokes the Health Changed event. If the current health is reduced to 0 or less the Zero Health event is invoked.

Unity Methods

Awake ( )

Sets the current health to the max health.