From 17909d029c6a8872b2fddf4e171d7925bbbe9c5c Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 19:27:35 +0100 Subject: Initial commit --- Simulation/Tank.hpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Simulation/Tank.hpp (limited to 'Simulation/Tank.hpp') diff --git a/Simulation/Tank.hpp b/Simulation/Tank.hpp new file mode 100644 index 0000000..f11d42b --- /dev/null +++ b/Simulation/Tank.hpp @@ -0,0 +1,34 @@ +#ifndef __TANK_HPP__ +#define __TANK_HPP__ + +#include +#include + +#include "ContactListener.hpp" + +class SimBase; + +class Tank +{ +public: + void create(SimBase *sim); + void updateAllPhysics(); + void draw(); + +private: + SimBase *hSim = nullptr; + + b2World world = b2World(b2Vec2(0.f, 0.f)); + sf::CircleShape worldEdges; + b2Body *tankEdge = nullptr; + + ContactListener contactListener; + + friend class Camera; + friend class Entity; + friend class Pellet; + friend class Guppie; + friend class Corpse; +}; + +#endif // __TANK_HPP__ -- cgit v1.2.1