summaryrefslogtreecommitdiffstats
path: root/pacman-c++/actor.h
diff options
context:
space:
mode:
Diffstat (limited to 'pacman-c++/actor.h')
-rw-r--r--pacman-c++/actor.h9
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
55private: 59private:
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;