-
Notifications
You must be signed in to change notification settings - Fork 0
/
drop.cpp
46 lines (38 loc) · 651 Bytes
/
drop.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
#include "drop.h"
#include <iostream>
Drop::Drop(int x, int y)
{
//image.load("C:/Users/Rambod/QtProjects/CS102Project/ball.png");
destroyed = false;
//rect = image.rect();
//rect.translate(x, y);
yDir = 1;
}
Drop::~Drop()
{
std::cout << ("Brick deleted\n");
}
QRect Drop::getRect()
{
return rect;
}
void Drop::setRect (QRect rct)
{
rect = rct;
}
QImage & Drop::getImage()
{
return image;
}
bool Drop::isDestroyed()
{
return destroyed;
}
void Drop::setDestroyed(bool destr)
{
destroyed = destr;
}
void Drop::autoMove()
{
rect.translate(0, yDir);
}