]> git.tdb.fi Git - libs/game.git/blob - examples/bassteroids/source/hittable.h
Use the setup generator to create setup structs
[libs/game.git] / examples / bassteroids / source / hittable.h
1 #ifndef HITTABLE_H_
2 #define HITTABLE_H_
3
4 #include <msp/game/entity.h>
5 #include "damagesource.h"
6 #include "hitpoints.h"
7 #include "physicalentity.h"
8 #include "setups.h"
9
10 class Hittable: public PhysicalEntity
11 {
12 public:
13         using Setup = HittableSetup;
14
15 private:
16         Msp::Game::Owned<HitPoints> hits;
17         Msp::Game::Owned<DamageSource> damage;
18
19 public:
20         Hittable(Msp::Game::Handle<Msp::Game::Entity>, const Setup &, const PhysicalSetup &,
21                 const Msp::Game::TransformValues & = Msp::Game::TransformValues());
22
23         Msp::Game::Handle<HitPoints> get_hitpoints() { return hits; }
24         Msp::Game::Handle<DamageSource> get_damage() { return damage; }
25 };
26
27 #endif