-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEntity.h
75 lines (50 loc) · 1.2 KB
/
Entity.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
69
70
71
72
73
74
75
#pragma once
class Entity
{
public:
Entity();
~Entity();
void Init(int posx, int posy, int w, int h, int s);
void Status(int score, int lives, bool chase, int frightened, int GameOverR);
void InitPacman(int x, int y, int vx, int vy, int vxTurn, int vyTurn, bool is_alive);
void InitGhost(int x, int y, int vx, int vy, bool is_alive, bool chase, char posOld);
void GetRect(int *posx, int *posy, int *w, int *h);
void GetRectPacman(int* posx, int* posy, int* w, int* h);
int GetX();
void SetX(int x);
int GetY();
void SetY(int y);
int GetVx();
void SetVx(int vx);
int GetVy();
void SetVy(int vy);
int GetVxTurn();
void SetVxTurn(int vxTurn);
int GetVyTurn();
void SetVyTurn(int vyTurn);
char GetPosOld();
void SetPosOld(char posOld);
int GetWidth();
int GetScore();
void SetScore(int score);
int GetLives();
void SetLives(int lives);
bool GetChase();
void SetChase(bool chase);
int GetFrightened();
void SetFrightened(int frightened);
int GetGameOverR();
void SetGameOverR(int GameOverR);
void AddGameOverR();
private:
int x, y;
int vx, vy;
int vxTurn, vyTurn;
int width, height;
char posOld;
int score;
int lives;
bool chase;
int frightened;
int GameOverR;
};