-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEntityPlayer.h
60 lines (45 loc) · 1.04 KB
/
EntityPlayer.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef ENTITYPLAYER_H
#define ENTITYPLAYER_H
#include <iostream>
#include <memory>
#include "lib/glm/vec2.hpp"
#include "RectangleShape.h"
#include "MovingEntity.h"
#include "TypePlayer.h"
#include "TypeInventory.h"
#include "Inventory.h"
#include "Settings.h"
#include "Mouse.h"
#include "GroundItemStack.h"
class EntityPlayer : public MovingEntity
{
public:
EntityPlayer(TypePlayer);
~EntityPlayer(void);
void update(float, const Uint8*);
void updateNoKey(float);
glm::vec2 getCenterPosition(void);
void setId(int);
int getId(void);
bool isOnline(void);
glm::vec2 getSize(void);
RectangleShape* getBB(void);
std::string getTexture(void);
void setFriction(float);
std::shared_ptr<Inventory> getInventory(void);
bool hasInventoryOpen(void);
void setInventory(std::shared_ptr<Inventory>);
void toggleInventory(void);
private:
int id;
bool online;
bool inventoryOpen;
float maxSpeed;
float acceleration;
float friction;
std::string texture;
glm::vec2 size;
RectangleShape* bb;
std::shared_ptr<Inventory> inventory;
};
#endif