diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-05 14:26:19 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-05 14:26:19 +0100 |
commit | ba170d00586ab261e015cc2febbb43f9aa7ae43e (patch) | |
tree | 4b902f20aa0b10a3ac04ec2c03f46ec3449558d1 /game/coins/CoinScript.cpp | |
parent | 5ae4e3f0e3ff1d111eaea54b7b0a0788203d9d72 (diff) |
added hud
Diffstat (limited to 'game/coins/CoinScript.cpp')
-rw-r--r-- | game/coins/CoinScript.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/game/coins/CoinScript.cpp b/game/coins/CoinScript.cpp index 862e7f9..5a1e922 100644 --- a/game/coins/CoinScript.cpp +++ b/game/coins/CoinScript.cpp @@ -2,6 +2,7 @@ #include "api/CircleCollider.h" #include "api/Sprite.h" #include "manager/SaveManager.h" +#include "../Config.h" using namespace crepe; using namespace std; @@ -12,8 +13,8 @@ bool CoinScript::on_collision(const CollisionEvent & collisionData){ this->get_component<Sprite>().active = false; this->get_component<CircleCollider>().active = false; SaveManager & savemgr = this->get_save_manager(); - int amount = savemgr.get<int>(COIN_GAME_AMOUNT,0).get() + 1; - savemgr.set(COIN_GAME_AMOUNT, amount); + int amount = savemgr.get<int>(TOTAL_COINS_RUN,0).get() + 1; + savemgr.set(TOTAL_COINS_RUN, amount); return true; } |