aboutsummaryrefslogtreecommitdiff
path: root/Simulation/Tank.hpp
blob: f11d42bba55d754d9d60a60b1eb709b2fbbce842 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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__