diff options
author | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 19:27:35 +0100 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 19:27:49 +0100 |
commit | 17909d029c6a8872b2fddf4e171d7925bbbe9c5c (patch) | |
tree | cbb08af84cd68d24acc362d593a2048b0fa79689 /Simulation/Tank.hpp |
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__ |