-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchar.h
59 lines (46 loc) · 1.39 KB
/
char.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
#ifndef CHAR_H
#define CHAR_H
#include <QPixmap>
#include <QPoint>
#define L 800
class Char
{
private:
int angleHorizontal; //Angle du canon horizontalement de 0 à 360°
int angleVertical; //0 à 90°
int deplacement; //capacité de déplacement restant au tank initialisé à L/10
int nbObus2;
int nbObus3;
bool alive;
QPoint pos;
int orientation; // orientation, 0 haut, 1 gauche, 2 bas, 3 droite
QPixmap * texture_Corps;
QPixmap * texture_Cannon;
int vie;
public:
Char(int numero_joueur);
int getNbObus2() const;
int getNbObus3() const;
void enlever_pv(int degats);
int get_pv();
void tir_Obus(int type_obus);
int getOrientation() const;
void setOrientation(int value);
void enlever_Deplacement(int value);
bool deplacement_Possible(int penalite_deplacement);
void reset_Deplacement();
int get_nb_Deplacement_Possible();
void setPosition(int x, int y);
void changer_Position(int x, int y, int penalite_deplacement);
int getX() const;
int getY() const;
QPixmap get_Texture_Corps();
QPixmap get_Texture_Cannon();
void setTextureCorps(QPixmap* newTexture);
void setTextureCannon(QPixmap* newTexture);
int getAngle_horizontal() const;
int getAngle_vertical() const;
void changer_angle_horizontal(int angle);
void changer_angle_vertical(int angle);
};
#endif // CHAR_H