This advanced health script comes bundled with a collection of effects.It is also easy to utilize with C# and provides designer friendly Unity Events.The effects are made to work for both 2D and 3D.* Full source code included.* WebGL demos includedDOCUMENTATION | WEBGL DEMO
Included health effects:* Screen Shake* Renderer Hit Flash (Fresnel Shader)* Display Text Popup (Damage/Heal numbers)* Play Animation* Disable colliders* Punch Scale On Damage* Pushback (Rigidbody, NavMeshAgent, Character Controller)* Screen Overlay On Damage* Play Sound* Display Health Bar* Drop Item (With weights)* Display Particle* Invisibility on hit
Included health listeners (UnityEvents):* Death Event Listener* Damage Event Listener* Heal Event Listener* Invulnerability Event Listener* Restore Event Listener* Revive Event Listener* Health Modified Event ListenerAdditonal Features:* Health groups - easily track multiple health components and add health effects to the group (Update health bar)* Health modification volumes - Areas you can apply to projectiles or the ground to do one-time damage orcontinuous damage.
Performance* Interfaces are used to communicate health events, this is quicker than delegates* All health listeners are cached during editor-time, meaning there is low startup cost.* The effects make use of co-routines, this has not provided any issues thus far* No update loop is used except for the optional Health Bars. All code is heavily decoupled.* Spawned particles, Health popups and Health bars are pooled
Games that have utilized an earlier version of this system:* BOXKILL* MASKED