-
Notifications
You must be signed in to change notification settings - Fork 1
/
coin.h
42 lines (37 loc) · 669 Bytes
/
coin.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
#ifndef COIN_H
#define COIN_H
#include <cstdlib>
#include <QImage>
#include <QRect>
#include <cstring>
class Coin
{
public:
Coin(int, int,int,int, char*);
~Coin();
public:
void resetState();
void autoMove(int, int);
bool isDestroyed();
void setDestroyed(bool);
void imageChange(char *);
void imageChangeright(char *);
QRect getRect();
void setRect(QRect);
QImage & getImage();
int getX();
int getY();
void moveLeft(int);
void moveRight(int);
private:
QImage image;
QRect rect;
int position;
bool destroyed;
int x;
int y;
int xdir;
int ydir;
char* pic;
};
#endif