aboutsummaryrefslogtreecommitdiff
path: root/game/coins/CoinScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/coins/CoinScript.cpp')
-rw-r--r--game/coins/CoinScript.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/game/coins/CoinScript.cpp b/game/coins/CoinScript.cpp
index 5960446..a3ee3b9 100644
--- a/game/coins/CoinScript.cpp
+++ b/game/coins/CoinScript.cpp
@@ -10,11 +10,11 @@ using namespace crepe;
using namespace std;
bool CoinScript::on_collision(const CollisionEvent & collisionData){
- if(collisionData.info.other.metadata.tag != "coin") return true;
+ if(collisionData.info.other.metadata.tag != "coin") return false;
this->get_components_by_name<Sprite>(collisionData.info.other.metadata.name).front().get().active = false;
this->get_components_by_name<CircleCollider>(collisionData.info.other.metadata.name).front().get().active = false;
this->amount++;
- return true;
+ return false;
}
void CoinScript::init(){