Rect class GetX, GetY, GetW, GetH now exist for camera calculations in the future

This commit is contained in:
Ben
2018-10-10 11:39:26 +01:00
parent 1757c67ab3
commit 053aa9e91a
2 changed files with 21 additions and 0 deletions

View File

@@ -116,6 +116,22 @@ int Rect::Area() {
return (w + h);
}
int Rect::GetX() {
return x;
}
int Rect::GetY() {
return y;
}
int Rect::GetW() {
return w;
}
int Rect::GetH() {
return h;
}
void Rect::SetRect(int x, int y, int w, int h) {
this->x = x;
this->y = y;

View File

@@ -50,6 +50,11 @@ public:
int Perimiter();
int Area();
int GetX();
int GetY();
int GetW();
int GetH();
void SetRect(int x, int y, int w, int h);
void SetSize(Vec2* size);
void SetPos(Vec2* pos);