blob: 6ca32b7dd9435a2f79aee676c52bbf3b53c17365 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef GAMEITEM_H
#define GAMEITEM_H
#include <QGraphicsItem>
class QLineF;
class GameItem: public QGraphicsItem
{
public:
enum { Type = UserType + 1 };
int type() const { return Type; }
virtual void idle(qreal elapsed) = 0;
virtual void hitByRocket() = 0;
protected:
QPointF tryMove(const QPointF &requestedPosition, QLineF *collidedLine = 0,
QGraphicsItem **collidedItem = 0) const;
};
#endif
|