-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainplayer.h
68 lines (64 loc) · 1.92 KB
/
mainplayer.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
61
62
63
64
65
66
67
68
#ifndef MAINPLAYER_H
#define MAINPLAYER_H
#include "player.h"
#include "WeaponFactory.h"
namespace SSJ{
class MainPlayer : public Player
{
private:
bool moveLeft;
bool moveRight;
bool moveForward;
bool moveBackward;
int currentWeaponIndex;
int frags;
protected:
Weapon* weapon1;
vector <Weapon*> equipWeapon;
public:
MainPlayer();
void eventMouseButtonPressed(sf::Event event);
void eventMouseButtonReleased(sf::Event event);
void eventMouseMoved(sf::Event event);
void eventStartMoveForward(sf::Event event);
void eventStartMoveBackward(sf::Event event);
void eventStartMoveLeft(sf::Event event);
void eventStartMoveRight(sf::Event event);
void eventStopMoveForward(sf::Event event);
void eventStopMoveBackward(sf::Event event);
void eventStopMoveLeft(sf::Event event);
void eventStopMoveRight(sf::Event event);
void eventReload(sf::Event event);
void eventMouseWheel(sf::Event event);
bool getMoveLeft() const;
void setMoveLeft(const bool value);
bool getMoveRight() const;
void setMoveRight(const bool value);
bool getMoveForward() const;
void setMoveForward(const bool value);
bool getMoveBackward() const;
void setMoveBackward(const bool value);
void draw();
void update();
Weapon* getWeapon1();
Weapon* getSelectedWeapon(int) const ;
/* JSON:
* {
* mapPositionX: "",
* mapPositionY: "",
* activity: "",
* hp: "",
* maxHP: "",
* angle: "",
* targetAngle: "",
* velocity: ""
*
* }
*/
void SynchronizationObject(Json::Value);
Json::Value SerializeMainPlayer();
int getFrags() const;
void setFrags(int value);
};
}
#endif // MAINPLAYER_H