summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pacman-c++/bonuspoint.cpp1
-rw-r--r--pacman-c++/gameentity.cpp10
-rw-r--r--pacman-c++/sceneholder.cpp1
3 files changed, 11 insertions, 1 deletions
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)
23bool BonusPoint::enter(Actor* actor) 23bool BonusPoint::enter(Actor* actor)
24{ 24{
25 actor->addRoundPoints(Constants::Game::bonus_point_value); 25 actor->addRoundPoints(Constants::Game::bonus_point_value);
26 actor->eatingCherry();
27 m_eaten = true; 26 m_eaten = true;
28 return false; 27 return false;
29} 28}
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 @@
1
2#include "gameentity.h"
3
4
5GameEntity::GameEntity()
6 : m_eaten(false)
7{
8
9}
10
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)
104 visualMap[x][y] = item; 104 visualMap[x][y] = item;
105 if (oldItem != NULL) 105 if (oldItem != NULL)
106 { 106 {
107 oldItem->onDie();
107 m_scene->removeItem(item); 108 m_scene->removeItem(item);
108 delete oldItem; 109 delete oldItem;
109 } 110 }