summaryrefslogtreecommitdiffstats
path: root/pacman-c++/actor.h
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2011-04-12 18:08:02 +0200
committermanuel <manuel@mausz.at>2011-04-12 18:08:02 +0200
commit651a1bee1adc5318922d1b37b0cea11a65df71e2 (patch)
treea60d4921d569f0b4b817e31e049cbc64d11d05f9 /pacman-c++/actor.h
parentfae7c3377c8995b217e620c5cf1e963b3ab1e84a (diff)
downloadfoop-651a1bee1adc5318922d1b37b0cea11a65df71e2.tar.gz
foop-651a1bee1adc5318922d1b37b0cea11a65df71e2.tar.bz2
foop-651a1bee1adc5318922d1b37b0cea11a65df71e2.zip
make removal of items from scene delayed by one tick (looks better)
all items are now derived from gameentity and gameentity is derived from pixmapitem: - this is naturally better - allows us to add a generic gameentity.color()
Diffstat (limited to 'pacman-c++/actor.h')
-rw-r--r--pacman-c++/actor.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/pacman-c++/actor.h b/pacman-c++/actor.h
index ae04687..6b6f743 100644
--- a/pacman-c++/actor.h
+++ b/pacman-c++/actor.h
@@ -1,7 +1,7 @@
1#ifndef ACTOR_H 1#ifndef ACTOR_H
2#define ACTOR_H 2#define ACTOR_H
3 3
4#include "pixmapitem.h" 4#include "gameentity.h"
5#include "constants.h" 5#include "constants.h"
6#include "audio.h" 6#include "audio.h"
7#include <QtCore/QSequentialAnimationGroup> 7#include <QtCore/QSequentialAnimationGroup>
@@ -9,7 +9,7 @@
9#include <QList> 9#include <QList>
10 10
11class Actor 11class Actor
12 : public PixmapItem 12 : public GameEntity
13{ 13{
14Q_OBJECT 14Q_OBJECT
15 15
@@ -27,7 +27,6 @@ public:
27 {}; 27 {};
28 28
29 QSequentialAnimationGroup *setupEatingAnimation(Actor::Movement direction); 29 QSequentialAnimationGroup *setupEatingAnimation(Actor::Movement direction);
30 Color::Color color();
31 PixmapItem &icon(); 30 PixmapItem &icon();
32 Movement direction(); 31 Movement direction();
33 bool isLocal(); 32 bool isLocal();
@@ -47,7 +46,6 @@ private:
47 46
48private: 47private:
49 QPixmap m_pix; 48 QPixmap m_pix;
50 Color::Color m_color;
51 Movement m_direction; 49 Movement m_direction;
52 PixmapItem m_icon; 50 PixmapItem m_icon;
53 bool m_local; 51 bool m_local;