From 41a31420cf091aeb4e986503387855d41e550106 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 25 Apr 2011 14:39:00 +0200 Subject: - add intro sound on every round - add dieing sound - add dieing animation - add die on moving onto colorized block --- pacman-c++/gameentity.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'pacman-c++/gameentity.h') diff --git a/pacman-c++/gameentity.h b/pacman-c++/gameentity.h index 92b485e..116fae5 100644 --- a/pacman-c++/gameentity.h +++ b/pacman-c++/gameentity.h @@ -20,6 +20,13 @@ public: Type = UserType + 1 }; + enum EnteredState + { + Nothing, + DestroyedEntity, + DestroyedActor + }; + public: GameEntity(Color::Color color = Color::none, QGraphicsItem *parent = 0); GameEntity(QGraphicsItem *parent); @@ -41,18 +48,10 @@ public: /* performs action when this actor acctually enters * returns whether this entity survives the entering */ - virtual bool enter(Actor *) + virtual EnteredState enter(Actor *) { /* default to no action/survive */ - return true; - } - - /* check whether this entity is regarded as eaten - * (and can be removed in the next tick) - */ - virtual bool eaten() - { - return m_eaten; + return Nothing; } /* called when an instance acctually dies for creating effects */ @@ -67,7 +66,6 @@ public: protected: int m_type; - bool m_eaten; Color::Color m_color; }; -- cgit v1.2.3