]> git.tdb.fi Git - libs/game.git/blob - examples/bassteroids/source/damagesource.h
Use the setup generator to create setup structs
[libs/game.git] / examples / bassteroids / source / damagesource.h
1 #ifndef DAMAGESOURCE_H_
2 #define DAMAGESOURCE_H_
3
4 #include <msp/game/component.h>
5 #include "setups.h"
6
7 class DamageSource: public Msp::Game::Component
8 {
9 public:
10         using Setup = DamageSourceSetup;
11
12 private:
13         const Setup &setup;
14
15 public:
16         DamageSource(Msp::Game::Handle<Msp::Game::Entity>, const Setup &);
17
18         unsigned get_amount() const { return setup.amount; }
19         unsigned get_type() const { return setup.type; }
20 };
21
22 #endif