diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-07 15:03:53 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-07 15:03:53 +0100 |
commit | e7ff8a9d0cff724520c4fb7a13b77e93797759cf (patch) | |
tree | c9261f172eef20857010180d82cb30e51cd6e5e8 /game/coins/CoinScript.cpp | |
parent | 2c4091f845513cee2de4aac652f9720c74789327 (diff) |
saving coins avaiable in menu
Diffstat (limited to 'game/coins/CoinScript.cpp')
-rw-r--r-- | game/coins/CoinScript.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/game/coins/CoinScript.cpp b/game/coins/CoinScript.cpp index a3ee3b9..2ecbb98 100644 --- a/game/coins/CoinScript.cpp +++ b/game/coins/CoinScript.cpp @@ -19,7 +19,6 @@ bool CoinScript::on_collision(const CollisionEvent & collisionData){ void CoinScript::init(){ this->subscribe<CollisionEvent>([this](const CollisionEvent & ev) -> bool { return this->on_collision(ev); }); - this->subscribe<EndGameEvent>([this](const EndGameEvent e)-> bool { return this->save(); }); } void CoinScript::fixed_update(crepe::duration_t dt) { @@ -31,6 +30,5 @@ void CoinScript::fixed_update(crepe::duration_t dt) { bool CoinScript::save(){ SaveManager & savemgr = this->get_save_manager(); savemgr.set(TOTAL_COINS_RUN, this->amount); - this->amount = 0; return false; } |