Gradient HealthBar

Created 2 new images for the health bar, using the smudge tool to create the slight gradient between the red and green.
The mask is now simply a transparent rectangle with Reflecting gradient, to make the middle clearer and the bottom and top border more opaque.

Added clamps in the healthAsPercentage() getter (in Update() it was having issues as if you got under the min it kinda flickered the healthbar and then sets itself OK) so now I cannot set bellow 0 and cannot have more current health than max health. Made current health serializable to test the modifications. You can still set max health to whatever you want.

Privacy & Terms