From 46cba78d4017cad17550a1169c7deb7120710c2a Mon Sep 17 00:00:00 2001 From: totycro Date: Mon, 11 Apr 2011 12:43:41 +0200 Subject: added missing file --- pacman-c++/bonuspoint.cpp | 1 - pacman-c++/gameentity.cpp | 10 ++++++++++ pacman-c++/sceneholder.cpp | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 pacman-c++/gameentity.cpp (limited to 'pacman-c++') diff --git a/pacman-c++/bonuspoint.cpp b/pacman-c++/bonuspoint.cpp index 2a772d5..2b5500b 100644 --- a/pacman-c++/bonuspoint.cpp +++ b/pacman-c++/bonuspoint.cpp @@ -23,7 +23,6 @@ BonusPoint::BonusPoint(QGraphicsItem *parent) bool BonusPoint::enter(Actor* actor) { actor->addRoundPoints(Constants::Game::bonus_point_value); - actor->eatingCherry(); m_eaten = true; return false; } diff --git a/pacman-c++/gameentity.cpp b/pacman-c++/gameentity.cpp new file mode 100644 index 0000000..e8743df --- /dev/null +++ b/pacman-c++/gameentity.cpp @@ -0,0 +1,10 @@ + +#include "gameentity.h" + + +GameEntity::GameEntity() + : m_eaten(false) +{ + +} + diff --git a/pacman-c++/sceneholder.cpp b/pacman-c++/sceneholder.cpp index 1596ba1..e4429f6 100644 --- a/pacman-c++/sceneholder.cpp +++ b/pacman-c++/sceneholder.cpp @@ -104,6 +104,7 @@ void SceneHolder::updateMap(const Transmission::map_t& map) visualMap[x][y] = item; if (oldItem != NULL) { + oldItem->onDie(); m_scene->removeItem(item); delete oldItem; } -- cgit v1.2.3