FCV Engine 0.1
A tool and framework for tutorials in game development
Loading...
Searching...
No Matches
HealthUI Class Reference

Connects Health with UI, made it generalised so it can be used in multiple places and be connected with multiple amounts of UI Elements. More...

Inheritance diagram for HealthUI:

Private Member Functions

void OnDisable ()
 Removes listeners from onHealthChanged.
 
void OnHealthChanged (int currentHealth, int maxHealth)
 Invokes the healthUpdate UnityEvent and sending percentile health is of maxHealth.
 

Detailed Description

Connects Health with UI, made it generalised so it can be used in multiple places and be connected with multiple amounts of UI Elements.

Definition at line 10 of file HealthUI.cs.

Member Function Documentation

◆ OnHealthChanged()

void OnHealthChanged ( int currentHealth,
int maxHealth )
private

Invokes the healthUpdate UnityEvent and sending percentile health is of maxHealth.

Parameters
currentHealththe current health the player or object has
maxHealththe max health of the player or object has

Definition at line 35 of file HealthUI.cs.


The documentation for this class was generated from the following file: