summaryrefslogtreecommitdiffstats
path: root/pacman-c++/sceneholder.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++/sceneholder.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++/sceneholder.h')
-rw-r--r--pacman-c++/sceneholder.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/pacman-c++/sceneholder.h b/pacman-c++/sceneholder.h
index 61cff3e..5183f65 100644
--- a/pacman-c++/sceneholder.h
+++ b/pacman-c++/sceneholder.h
@@ -4,7 +4,7 @@
4#include "constants.h" 4#include "constants.h"
5#include <QtGui> 5#include <QtGui>
6 6
7class PixmapItem; 7class GameEntity;
8class Actor; 8class Actor;
9 9
10class SceneHolder 10class SceneHolder
@@ -32,11 +32,16 @@ protected:
32 QPoint CoordToMapPosition(QPoint point); 32 QPoint CoordToMapPosition(QPoint point);
33 33
34 /* map of all pixmap instances */ 34 /* map of all pixmap instances */
35 QVector< QVector<PixmapItem *> > visualMap; 35 QVector< QVector<GameEntity *> > visualMap;
36 36
37 /* map of actors in order to keep track of those instances */ 37 /* map of actors in order to keep track of those instances */
38 QMap<Color::Color, Actor*> m_actors; 38 QMap<Color::Color, Actor*> m_actors;
39 39
40 /* items that got removed/has been eaten
41 * must be remove one tick later
42 */
43 QList<GameEntity *> m_oldItems;
44
40 /* my local color */ 45 /* my local color */
41 Color::Color m_color; 46 Color::Color m_color;
42 47