diff options
Diffstat (limited to 'pacman-c++/gameentity.h')
| -rw-r--r-- | pacman-c++/gameentity.h | 6 |
1 files changed, 6 insertions, 0 deletions
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: | |||
| 20 | // returns whether this entity survives the entering | 20 | // returns whether this entity survives the entering |
| 21 | virtual bool enter(Actor *actor) { Q_UNUSED(actor); return true; } // default to no action/survive | 21 | virtual bool enter(Actor *actor) { Q_UNUSED(actor); return true; } // default to no action/survive |
| 22 | 22 | ||
| 23 | // check whether this entity is regarded as eaten | ||
| 24 | // (and can be removed in the next tick) | ||
| 23 | virtual bool eaten() { return m_eaten; } | 25 | virtual bool eaten() { return m_eaten; } |
| 24 | 26 | ||
| 27 | // called when an instance acctually dies for creating effects | ||
| 28 | virtual void onDie(Actor *actor) { Q_UNUSED(actor); }; | ||
| 29 | |||
| 30 | |||
| 25 | protected: | 31 | protected: |
| 26 | bool m_eaten; | 32 | bool m_eaten; |
| 27 | }; | 33 | }; |
