blob: 9805a8a2fd8180584485a0a876cdda428619b615 (
plain)
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
|
#ifndef ROCKETITEM_H
#define ROCKETITEM_H
#include "gameitem.h"
class RocketItem: public GameItem
{
public:
RocketItem();
virtual void idle(qreal elapsed);
qreal speed() const { return 100.0; }
void setDirection(qreal direction) { m_direction = direction; }
void hitByRocket();
protected:
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QRectF boundingRect() const;
private:
qreal m_direction;
qreal m_distance;
};
#endif
|