diff options
| author | totycro <totycro@unknown-horizons.org> | 2011-04-11 12:09:04 +0200 |
|---|---|---|
| committer | totycro <totycro@unknown-horizons.org> | 2011-04-11 12:09:04 +0200 |
| commit | 98f4a31e1a359a69dbcc0fa4055f36cefb6d4e02 (patch) | |
| tree | ddd164d3339a067116f02f88314e2f57457bb1df /pacman-c++/pixmapitem.h | |
| parent | 30c36b7549f8ae411f8eca4de144627331895a24 (diff) | |
| download | foop-98f4a31e1a359a69dbcc0fa4055f36cefb6d4e02.tar.gz foop-98f4a31e1a359a69dbcc0fa4055f36cefb6d4e02.tar.bz2 foop-98f4a31e1a359a69dbcc0fa4055f36cefb6d4e02.zip | |
Added basic game logic
Diffstat (limited to 'pacman-c++/pixmapitem.h')
| -rw-r--r-- | pacman-c++/pixmapitem.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pacman-c++/pixmapitem.h b/pacman-c++/pixmapitem.h index f57c22a..88770d2 100644 --- a/pacman-c++/pixmapitem.h +++ b/pacman-c++/pixmapitem.h | |||
| @@ -4,8 +4,10 @@ | |||
| 4 | #include <QtGui/QGraphicsObject> | 4 | #include <QtGui/QGraphicsObject> |
| 5 | #include <QtGui/QGraphicsScene> | 5 | #include <QtGui/QGraphicsScene> |
| 6 | 6 | ||
| 7 | #include "gameentity.h" | ||
| 8 | |||
| 7 | class PixmapItem | 9 | class PixmapItem |
| 8 | : public QGraphicsObject | 10 | : public QGraphicsObject, GameEntity |
| 9 | { | 11 | { |
| 10 | public: | 12 | public: |
| 11 | PixmapItem(QGraphicsItem *parent = 0); | 13 | PixmapItem(QGraphicsItem *parent = 0); |
| @@ -23,6 +25,9 @@ public: | |||
| 23 | QPainterPath shape() const; | 25 | QPainterPath shape() const; |
| 24 | void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); | 26 | void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); |
| 25 | 27 | ||
| 28 | virtual bool checkEnter(Actor *actor) { Q_UNUSED(actor); return true; } // default to true | ||
| 29 | virtual void enter(Actor *actor) { Q_UNUSED(actor); } // default to no action | ||
| 30 | |||
| 26 | private: | 31 | private: |
| 27 | QPixmap m_pix; | 32 | QPixmap m_pix; |
| 28 | int m_x, m_y; | 33 | int m_x, m_y; |
