]> git.tdb.fi Git - libs/game.git/blobdiff - examples/bassteroids/source/bullet.h
Make it possible to shoot bullets in Bassteroids
[libs/game.git] / examples / bassteroids / source / bullet.h
diff --git a/examples/bassteroids/source/bullet.h b/examples/bassteroids/source/bullet.h
new file mode 100644 (file)
index 0000000..825125f
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef BULLET_H_
+#define BULLET_H_
+
+#include <msp/game/meshsource.h>
+#include "physicalentity.h"
+
+struct BulletSetup
+{
+       PhysicalSetup physical;
+       Msp::Game::MeshSourceSetup mesh;
+};
+
+class Bullet: public PhysicalEntity
+{
+private:
+       Msp::Game::Owned<Msp::Game::MeshSource> mesh;
+
+public:
+       using Setup = BulletSetup;
+
+       Bullet(Msp::Game::Handle<Msp::Game::Entity>, const Setup &);
+};
+
+#endif