X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=examples%2Fbassteroids%2Fsource%2Fplayfield.h;fp=examples%2Fbassteroids%2Fsource%2Fplayfield.h;h=10596e98a1ad5c3d145c383341ce431190d1fec0;hb=391f1ab3c7ca52a9990f516f4cdd7094f60350df;hp=0000000000000000000000000000000000000000;hpb=cf97839fff9ecb0783cecc9510994fb4a13f2dbe;p=libs%2Fgame.git diff --git a/examples/bassteroids/source/playfield.h b/examples/bassteroids/source/playfield.h new file mode 100644 index 0000000..10596e9 --- /dev/null +++ b/examples/bassteroids/source/playfield.h @@ -0,0 +1,36 @@ +#ifndef PLAYFIELD_H_ +#define PLAYFIELD_H_ + +#include +#include "physicalentity.h" + +struct PlayfieldSetup +{ + Msp::LinAl::Vector size; +}; + +class Playfield: public Msp::Game::Entity +{ +public: + using Setup = PlayfieldSetup; + +private: + struct Border + { + PhysicalSetup setup; + Msp::Game::Owned entity; + + Border(Playfield &, Msp::LinAl::Vector, Msp::LinAl::Vector); + }; + + const Setup &setup; + Border left; + Border right; + Border bottom; + Border top; + +public: + Playfield(Msp::Game::Handle, const Setup &); +}; + +#endif