-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobstacle.cpp
58 lines (46 loc) · 955 Bytes
/
obstacle.cpp
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
#include "obstacle.h"
Obstacle::Obstacle(){
resistance = 0;
resistanceOriginal = 0;
}
Obstacle::Obstacle(int resOri, int newIdentifiant){
resistanceOriginal = resOri;
resistance = resistanceOriginal;
identifiant = newIdentifiant;
}
void Obstacle::setResistanceOriginal(int resOri){
resistanceOriginal = resOri;
resistance = resistanceOriginal;
}
int Obstacle::getIdentifiant() const
{
return identifiant;
}
void Obstacle::setResistance(int newRes){
resistance = newRes;
}
int Obstacle::getResistance(){
return resistance;
}
int Obstacle::getResistanceOriginal(){
return resistanceOriginal;
}
QColor Obstacle::getCouleur()
{
return couleur;
}
void Obstacle::setCouleur(QColor newCouleur)
{
couleur = newCouleur;
}
QPixmap Obstacle::getTexture()
{
return *texture;
}
void Obstacle::setTexture(QPixmap *newTexture)
{
texture = newTexture;
}
Obstacle::~Obstacle(){
delete texture;
}