-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobject.h
More file actions
39 lines (35 loc) · 750 Bytes
/
object.h
File metadata and controls
39 lines (35 loc) · 750 Bytes
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
/*
This is the definition of the Object class. This class defines the behavior of the objects in the game: small Zomzom, adult Zomzom, giant Zomzom, weapons, and mysterious constructions.
*/
#ifndef OBJECT_H
#define OBJECT_H
#include <QImage>
#include <QRect>
class Object
{
protected:
int speed;
int dx;
int dy;
int dpoints;
int dhealth;
QImage image;
QRect rect;
public:
Object(int);
virtual void resetState();
void moveBottom(int);
void moveTop(int);
void moveLeft(int);
void moveRight(int);
virtual void autoMove(int, int);
void setXDir(int);
void setYDir(int);
int getXDir();
int getYDir();
QRect getRect();
QImage & getImage();
virtual void collision(int&, int&);
virtual void bulletCollision(int&);
};
#endif