DemoProductions / shmup

3 stars 2 forks source link

Initial HealthBar #99

Closed ghost closed 8 years ago

ghost commented 8 years ago

A HealthBar component is attached to a game object with Health. On play, the healthbar component instantiates a healthbar canvas.

Can attach a HealthBar canvas, HealthFull Image, and HealthEmpty Image in the HealthBar component editor.

A HealthBar canvas uses screen space overlay: see https://docs.unity3d.com/Manual/UICanvas.html

On update of the HealthBar, activate/deactive health nodes accordingly (they are all instantiated at start)

Cases when maximum health increases during a level? Need to be able to handle more than one player's healthbar location

flip40 commented 8 years ago

We should keep cases for increasing max health in mind, but it might not be necessary at the moment (in other words, I'll merge this without us adding that... don't want to keep this held up all day™ on improvements :D). I'll make an issue to note that as an improvement we can do.

This is nice and flexible too with the ability to change the images and adjust the distance between health nodes.