--- /dev/null
+#ifndef HITPOINTS_H_
+#define HITPOINTS_H_
+
+#include <msp/game/component.h>
+
+struct HitPointsSetup
+{
+ /*class Loader: public Msp::DataFile::ObjectLoader<HitPointsSetup>
+ {
+ };*/
+
+ unsigned max_hits = 1;
+ unsigned vulnerable_to = ~0U;
+};
+
+class HitPoints: public Msp::Game::Component
+{
+public:
+ using Setup = HitPointsSetup;
+
+private:
+ const Setup &setup;
+ unsigned remaining_hits;
+
+public:
+ HitPoints(Msp::Game::Handle<Msp::Game::Entity>, const Setup &);
+
+ void take_damage(unsigned, unsigned);
+
+ bool is_alive() const { return remaining_hits; }
+};
+
+#endif