Closed jmf closed 8 years ago
The idea is good but I would prefer using ProgressBar or TextureProgress Nodes. They permit to do easily what you did with sprites, and maybe even more properly.
EDIT : after a discussion on IRC, @jmf proved me by A + B that his choice was better, so this comment can now be considered as unuseful
Also could you add tween to smooth the healthbar as I did in this part of Geom ?
P.S : this system is meant to work with ascending and descending health
EDIT : after a discussion on IRC, @jmf proved me by A + B that his choice was better, so this comment can now be considered as unuseful
Tweening: The time between hits is quite short, so with tweening, the effect would either be unnoticeable or the health meter would always be lagging behind a little. ProgressBar/TextureProgress: I tested out TextureProgress but wasn't really convinced by how it looked, opposed to my approach, using scaling.
Here you can see the difference, TextureProgress on the left, my scaling approach on the right.
I understand the problem...
Then it's a :+1:
With this commit, enemies now have a health bar, that shows their remaining life, floating over them when they don't have maximum HP any more.