4 #include <msp/game/component.h>
9 unsigned remaining_hits;
12 class HitPoints: public Msp::Game::BufferedComponent<HitPointsData>
15 using Setup = HitPointsSetup;
21 HitPoints(Msp::Game::Handle<Msp::Game::Entity>, const Setup &);
23 void take_damage(unsigned, unsigned);
25 bool is_alive() const { return read().remaining_hits; }