Health Bar UI

Life Bar:

Intended Effect and look:

I want my heal bar to represent the number of lives the player has left 
since the player only starts with 3 lives and can have a max of 10.
The lives needed to be clearly represented so i intend on making them look like little wizard hats 
cute stuff i know. 

So to start i created a canvas and two sprites and empty and filled  health icon.

Canvas view

 In game View:


Next i created a script for my Ui This would be where i code the health bar : 
My finalized code calls the players health and adjusts the sprites accordingly 

Script:

The Final Out Come:


Next Step:

My Next Step will Be to remove the rest of the empty hats and add them as the player receives an item giving more max health.

Comments