diff options
| author | manuel <manuel@mausz.at> | 2011-04-07 04:02:55 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-07 04:02:55 +0200 |
| commit | 11a1b82636ab75cb9d002712a3e0f353ad6b2579 (patch) | |
| tree | 59c6c678ab20fa5bb373b85f8fe7775615e7f1d6 /pacman-c++/actor.h | |
| parent | 52fb2da3c61a1942ebb26a64a4b9513b24d10087 (diff) | |
| download | foop-11a1b82636ab75cb9d002712a3e0f353ad6b2579.tar.gz foop-11a1b82636ab75cb9d002712a3e0f353ad6b2579.tar.bz2 foop-11a1b82636ab75cb9d002712a3e0f353ad6b2579.zip | |
add some sounds
Diffstat (limited to 'pacman-c++/actor.h')
| -rw-r--r-- | pacman-c++/actor.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pacman-c++/actor.h b/pacman-c++/actor.h index 68bf06f..36b2a49 100644 --- a/pacman-c++/actor.h +++ b/pacman-c++/actor.h | |||
| @@ -6,10 +6,14 @@ | |||
| 6 | #include <QtCore/QSequentialAnimationGroup> | 6 | #include <QtCore/QSequentialAnimationGroup> |
| 7 | #include <QtCore/QParallelAnimationGroup> | 7 | #include <QtCore/QParallelAnimationGroup> |
| 8 | #include <QList> | 8 | #include <QList> |
| 9 | #include <QFile> | ||
| 10 | #include <phonon/MediaObject> | ||
| 9 | 11 | ||
| 10 | class Actor | 12 | class Actor |
| 11 | : public PixmapItem | 13 | : public PixmapItem |
| 12 | { | 14 | { |
| 15 | Q_OBJECT | ||
| 16 | |||
| 13 | public: | 17 | public: |
| 14 | enum Movement { | 18 | enum Movement { |
| 15 | None = 0, | 19 | None = 0, |
| @@ -28,6 +32,11 @@ public: | |||
| 28 | bool isLocal(); | 32 | bool isLocal(); |
| 29 | void move(Movement direction); | 33 | void move(Movement direction); |
| 30 | bool isMoving(); | 34 | bool isMoving(); |
| 35 | void die(); | ||
| 36 | void eatingCherry(); | ||
| 37 | |||
| 38 | private slots: | ||
| 39 | void enqueue(); | ||
| 31 | 40 | ||
| 32 | private: | 41 | private: |
| 33 | QPixmap m_pix; | 42 | QPixmap m_pix; |
| @@ -39,6 +48,8 @@ private: | |||
| 39 | QList<PixmapItem *> m_images; | 48 | QList<PixmapItem *> m_images; |
| 40 | QList<QSequentialAnimationGroup *> m_eating; | 49 | QList<QSequentialAnimationGroup *> m_eating; |
| 41 | QParallelAnimationGroup *m_moving; | 50 | QParallelAnimationGroup *m_moving; |
| 51 | Phonon::MediaObject *m_player; | ||
| 52 | QList<QFile *> m_sounds; | ||
| 42 | }; | 53 | }; |
| 43 | 54 | ||
| 44 | #endif // ACTOR_H | 55 | #endif // ACTOR_H |
