Anyone got good ideas on doing this? Downloaded some game sources, looked at some other stuff on the internet. Mostly it would suggest having say 3 images of 1 x heart, 2 x heart, 3 x heart. And leave in the players update section tracking the health as an integer, and displaying the correct image depending on players health.
Seems a bit redundant, especially if you have more than 3 hearts. Displaying health as a number is obviously easy and very dynamically easy to change.
Another thought was a spritemap and toggling which frame to play, but then this is tricky if you have extra hearts acquired in game.
Currently my only thought is to hard code n number of heart images, hard code their x,y in the HUD and have the visible or not depending on current health?