diff options
Diffstat (limited to 'Simulation/Tank.hpp')
-rw-r--r-- | Simulation/Tank.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
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 <SFML/Graphics.hpp> +#include <Box2d.h> + +#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__ |