From 651a1bee1adc5318922d1b37b0cea11a65df71e2 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 12 Apr 2011 18:08:02 +0200 Subject: 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() --- pacman-c++/sceneholder.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'pacman-c++/sceneholder.h') 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 @@ #include "constants.h" #include -class PixmapItem; +class GameEntity; class Actor; class SceneHolder @@ -32,11 +32,16 @@ protected: QPoint CoordToMapPosition(QPoint point); /* map of all pixmap instances */ - QVector< QVector > visualMap; + QVector< QVector > visualMap; /* map of actors in order to keep track of those instances */ QMap m_actors; + /* items that got removed/has been eaten + * must be remove one tick later + */ + QList m_oldItems; + /* my local color */ Color::Color m_color; -- cgit v1.2.3