karate / fuego-fighters

A top-down arcade game inspired by Aero Fighters, written in Python and Pygame
4 stars 7 forks source link

Add a power bar to the player. #6

Closed pathunstrom closed 5 years ago

pathunstrom commented 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.

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.

pathunstrom commented 5 years ago

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.

karate commented 5 years ago

Awesome @pathunstrom! Thank you!