diff options
| author | manuel <manuel@mausz.at> | 2011-05-02 15:50:23 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-05-02 15:50:23 +0200 |
| commit | ce20694e0db010b5d65bdd2ee81a410efbf99e3d (patch) | |
| tree | 6063fb3b023d156374936cc6d405abf3e57532cd /pacman-c++/actor.h | |
| parent | 41a31420cf091aeb4e986503387855d41e550106 (diff) | |
| download | foop-ce20694e0db010b5d65bdd2ee81a410efbf99e3d.tar.gz foop-ce20694e0db010b5d65bdd2ee81a410efbf99e3d.tar.bz2 foop-ce20694e0db010b5d65bdd2ee81a410efbf99e3d.zip | |
w000h00
Diffstat (limited to 'pacman-c++/actor.h')
| -rw-r--r-- | pacman-c++/actor.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pacman-c++/actor.h b/pacman-c++/actor.h index eb04c71..e7d3ebc 100644 --- a/pacman-c++/actor.h +++ b/pacman-c++/actor.h | |||
| @@ -34,9 +34,12 @@ public: | |||
| 34 | 34 | ||
| 35 | PixmapItem &icon(); | 35 | PixmapItem &icon(); |
| 36 | Movement direction(); | 36 | Movement direction(); |
| 37 | void resetAnimation(); | 37 | void setDirection(Movement direction); |
| 38 | void reset(); | ||
| 39 | bool hadReset(); | ||
| 38 | bool isLocal(); | 40 | bool isLocal(); |
| 39 | void move(Movement direction); | 41 | void move(Movement direction); |
| 42 | void move(QPoint newpos); | ||
| 40 | bool isMoving(); | 43 | bool isMoving(); |
| 41 | void die(); | 44 | void die(); |
| 42 | void eatingFruit(); | 45 | void eatingFruit(); |
| @@ -44,13 +47,14 @@ public: | |||
| 44 | void startEating(); | 47 | void startEating(); |
| 45 | void stopEating(); | 48 | void stopEating(); |
| 46 | bool canEat(Actor *other, const QList<Color::Color> &order); | 49 | bool canEat(Actor *other, const QList<Color::Color> &order); |
| 50 | virtual void onDie(Actor *); | ||
| 47 | 51 | ||
| 48 | unsigned int getRoundPoints(); | 52 | unsigned int getRoundPoints(); |
| 49 | unsigned int getGamePoints(); | 53 | unsigned int getGamePoints(); |
| 50 | void addRoundPoints(unsigned int amount); | 54 | void addRoundPoints(unsigned int amount); |
| 51 | void finishRound(bool died = false); | 55 | void finishRound(bool died = false); |
| 52 | 56 | ||
| 53 | static QPoint movementToPoint(const Actor::Movement direction); | 57 | static QPoint movementToPoint(const Movement direction); |
| 54 | 58 | ||
| 55 | private: | 59 | private: |
| 56 | void moveByServer(Movement direction); | 60 | void moveByServer(Movement direction); |
| @@ -61,6 +65,7 @@ private: | |||
| 61 | Movement m_direction; | 65 | Movement m_direction; |
| 62 | PixmapItem m_icon; | 66 | PixmapItem m_icon; |
| 63 | bool m_local; | 67 | bool m_local; |
| 68 | bool m_reset; | ||
| 64 | GaplessAudioPlayer *m_wakaPlayer; | 69 | GaplessAudioPlayer *m_wakaPlayer; |
| 65 | 70 | ||
| 66 | unsigned int m_roundPoints; | 71 | unsigned int m_roundPoints; |
