Closed jmmk closed 9 years ago
Need to have a base hp field in component in order to calculate %. Separate HP from attackable so that hp entities don't show up in targeting. Need to find top left of the entity to which the health bar belongs. Set the anchor of the hp bar to bottom left and set it's position to the same x,y.
See https://github.com/johntrimble/asteroids/blob/master/src/cljs/asteroids/health.cljs for an example of how he draws the rectangles
implemented as health-bar component
New entity that shares the hp component of another entity and is positioned at top of it