]> git.tdb.fi Git - libs/game.git/blob - examples/bassteroids/source/playfield.h
Use the setup generator to create setup structs
[libs/game.git] / examples / bassteroids / source / playfield.h
1 #ifndef PLAYFIELD_H_
2 #define PLAYFIELD_H_
3
4 #include <msp/game/entity.h>
5 #include "physicalentity.h"
6 #include "setups.h"
7
8 class Playfield: public Msp::Game::Entity
9 {
10 public:
11         using Setup = PlayfieldSetup;
12
13 private:
14         struct Border
15         {
16                 PhysicalSetup setup;
17                 Msp::Game::Owned<PhysicalEntity> entity;
18
19                 Border(Playfield &, Msp::LinAl::Vector<float, 2>, Msp::LinAl::Vector<float, 2>);
20         };
21
22         const Setup &setup;
23         Border left;
24         Border right;
25         Border bottom;
26         Border top;
27
28 public:
29         Playfield(Msp::Game::Handle<Msp::Game::Entity>, const Setup &);
30 };
31
32 #endif