Closed pathunstrom closed 5 years ago
I think this does what you're looking for in #1?
I wanted to minimize how much work this one does, so it only tracks its current HP and only draws when the renderables group asks for it.
renderables
I also had to add a line to the collisions to set the player_ship's hp to zero so that it would finish rendering down HP and then disappear.
player_ship
Also, I just put the UI layer high enough to be over most things, but figure that's a pretty arbitrary designation.
I'll also note that the way it's written, you can add these to any enemy ship that gets damaged for a bit of juice.
Awesome @pathunstrom! Thank you!
I think this does what you're looking for in #1?
I wanted to minimize how much work this one does, so it only tracks its current HP and only draws when the
renderables
group asks for it.I also had to add a line to the collisions to set the
player_ship
's hp to zero so that it would finish rendering down HP and then disappear.Also, I just put the UI layer high enough to be over most things, but figure that's a pretty arbitrary designation.