-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBodyManager.h
41 lines (22 loc) · 914 Bytes
/
BodyManager.h
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
35
36
37
38
39
40
41
#pragma once
class BodyManager
{
static std::shared_ptr< BodyManager > objInstance;
static std::unique_ptr< Player > player;
static std::vector< std::shared_ptr< Body > > bodys;
std::map< std::string, std::shared_ptr< Body > > mBodies;
BodyManager();
~BodyManager();
public:
static std::shared_ptr< BodyManager > Instance();
void createBody( BodyType btype );
void createBody( BodyType btype, b2Vec2 pos, std::shared_ptr< Texture > textr = nullptr );
void createBody( BodyType btype, float x, float y, std::shared_ptr< Texture > textr = nullptr );
std::shared_ptr< Body > getFirst();
std::vector< std::shared_ptr< Body > > getBodys();
Player* getPlayer();
std::vector<std::shared_ptr< dynBody > > getBoxes();
std::vector<std::shared_ptr<dynBody>> getDynBodies();
std::vector<std::shared_ptr<dynBody>> getWalls();
//static addBody();
};