-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgameobject.cpp
More file actions
191 lines (154 loc) · 4.09 KB
/
gameobject.cpp
File metadata and controls
191 lines (154 loc) · 4.09 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#include "gameobject.h"
int GameObject::idCounter = 1;
GameObject::GameObject(QObject *parent) : QObject(parent){
this->id = idCounter;
idCounter++;
toDelete = false;
}
QMap<QString, QString> & GameObject::getModifiedProperties(){
return this->modifiedProperties;
}
float GameObject::getPosX(){
return this->posX;
}
void GameObject::setPosX(float posX){
if(this->posX != posX){
this->posX = posX;
this->modifiedProperties.insert("posX", QString::number(posX));
}
}
float GameObject::getPosY(){
return this->posY;
}
void GameObject::setPosY(float posY){
if(this->posY != posY){
this->posY = posY;
this->modifiedProperties.insert("posY", QString::number(posY));
}
}
float GameObject::getPosZ(){
return this->posZ;
}
void GameObject::setPosZ(float posZ){
if(this->posZ != posZ){
this->posZ = posZ;
this->modifiedProperties.insert("posZ", QString::number(posZ));
}
}
float GameObject::getOldPosX(){
return this->oldPosX;
}
void GameObject::setOldPosX(float oldPosX){
if(this->oldPosX != oldPosX){
this->oldPosX = oldPosX;
this->modifiedProperties.insert("oldPosX", QString::number(oldPosX));
}
}
float GameObject::getOldPosY(){
return this->oldPosY;
}
void GameObject::setOldPosY(float oldPosY){
if(this->oldPosY != oldPosY){
this->oldPosY = oldPosY;
this->modifiedProperties.insert("oldPosY", QString::number(oldPosY));
}
}
float GameObject::getOldPosZ(){
return this->oldPosZ;
}
void GameObject::setOldPosZ(float oldPosZ){
if(this->oldPosZ != oldPosZ){
this->oldPosZ = oldPosZ;
this->modifiedProperties.insert("oldPosZ", QString::number(oldPosZ));
}
}
float GameObject::getDirX(){
return this->dirX;
}
void GameObject::setDirX(float dirX){
if(this->dirX != dirX){
this->dirX = dirX;
this->modifiedProperties.insert("dirX", QString::number(dirX));
}
}
float GameObject::getDirY(){
return this->dirY;
}
void GameObject::setDirY(float dirY){
if(this->dirY != dirY){
this->dirY = dirY;
this->modifiedProperties.insert("dirY", QString::number(dirY));
}
}
float GameObject::getDirZ(){
return this->dirZ;
}
void GameObject::setDirZ(float dirZ){
if(this->dirZ != dirZ){
this->dirZ = dirZ;
this->modifiedProperties.insert("dirZ", QString::number(dirZ));
}
}
int GameObject::getCube(){
return this->cube;
}
void GameObject::setCube(int cube){
if(this->cube != cube){
this->cube = cube;
this->modifiedProperties.insert("cube", QString::number(cube));
}
}
float GameObject::getWidth(){
return this->width;
}
void GameObject::setWidth(float width){
if(this->width != width){
this->width = width;
this->modifiedProperties.insert("width", QString::number(width));
}
}
float GameObject::getHeight(){
return this->height;
}
void GameObject::setHeight(float height){
if(this->height != height){
this->height = height;
this->modifiedProperties.insert("height", QString::number(height));
}
}
float GameObject::getLength(){
return this->length;
}
void GameObject::setLength(float length){
if(this->length != length){
this->length = length;
this->modifiedProperties.insert("length", QString::number(length));
}
}
int GameObject::getColorRED(){
return this->colorRED;
}
void GameObject::setColorRED(int colorRED){
if(this->colorRED != colorRED){
this->colorRED = colorRED;
this->modifiedProperties.insert("colorRED", QString::number(colorRED));
}
}
int GameObject::getColorGREEN(){
return this->colorGREEN;
}
void GameObject::setColorGREEN(int colorGREEN){
if(this->colorGREEN != colorGREEN){
this->colorGREEN = colorGREEN;
this->modifiedProperties.insert("colorGREEN", QString::number(colorGREEN));
}
}
int GameObject::getColorBLUE(){
return this->colorBLUE;
}
void GameObject::setColorBLUE(int colorBLUE){
if(this->colorBLUE != colorBLUE){
this->colorBLUE = colorBLUE;
this->modifiedProperties.insert("colorBLUE", QString::number(colorBLUE));
}
}