From ea2880702a7df079f5e8eee0280584f186c2de73 Mon Sep 17 00:00:00 2001 From: totycro Date: Mon, 11 Apr 2011 13:03:40 +0200 Subject: Added code to play the cherry sound, but doesn't work here --- pacman-c++/gameentity.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pacman-c++/gameentity.h') diff --git a/pacman-c++/gameentity.h b/pacman-c++/gameentity.h index 2a771ee..0c0ab9c 100644 --- a/pacman-c++/gameentity.h +++ b/pacman-c++/gameentity.h @@ -20,8 +20,14 @@ public: // returns whether this entity survives the entering virtual bool enter(Actor *actor) { Q_UNUSED(actor); return true; } // default to no action/survive + // check whether this entity is regarded as eaten + // (and can be removed in the next tick) virtual bool eaten() { return m_eaten; } + // called when an instance acctually dies for creating effects + virtual void onDie(Actor *actor) { Q_UNUSED(actor); }; + + protected: bool m_eaten; }; -- cgit v1.2.3