1 | /* |
---|---|
2 | Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com> |
3 | Copyright (c) 2010 Brian Croom <brian.s.croom@gmail.com> |
4 | |
5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
9 | */ |
10 | |
11 | #ifndef BALL_H |
12 | #define BALL_H |
13 | |
14 | #include <KGameRenderedItem> |
15 | #include <QPointF> |
16 | #include "sprite.h" |
17 | |
18 | class KGameRenderer; |
19 | |
20 | class Ball : public KGameRenderedItem, public Sprite |
21 | { |
22 | QPointF m_velocity; |
23 | public: |
24 | Ball(KGameRenderer* renderer, const QString& id, int size); |
25 | |
26 | virtual void setOpacityF(qreal opacity); |
27 | virtual qreal opacityF() const; |
28 | |
29 | virtual void setVelocity(const QPointF& vel); |
30 | virtual QPointF velocity() const; |
31 | |
32 | virtual void setPosition(const QPointF& pos); |
33 | virtual QPointF position() const; |
34 | |
35 | qreal radius() const; |
36 | }; |
37 | |
38 | #endif // BALL_H |
39 | |
40 |