From 433c840c14782d84b4b95265b3e6f7a1f67ade3b Mon Sep 17 00:00:00 2001 From: Max-001 Date: Fri, 10 Jan 2025 14:44:57 +0100 Subject: Make format --- game/menus/shop/ShopLoadScript.cpp | 73 ++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 39 deletions(-) (limited to 'game/menus/shop/ShopLoadScript.cpp') diff --git a/game/menus/shop/ShopLoadScript.cpp b/game/menus/shop/ShopLoadScript.cpp index a9f9bfe..a545fe2 100644 --- a/game/menus/shop/ShopLoadScript.cpp +++ b/game/menus/shop/ShopLoadScript.cpp @@ -1,129 +1,124 @@ #include "ShopLoadScript.h" -#include +#include "Shopconfig.h" #include "api/Button.h" #include "api/Sprite.h" -#include "Shopconfig.h" #include "api/Text.h" #include "manager/SaveManager.h" +#include using namespace crepe; using namespace std; void ShopLoadScript::init() { this->update(); - this->subscribe([this](const ShopUpdate e) { - return this->update(); - }); + this->subscribe([this](const ShopUpdate e) { return this->update(); }); } -bool ShopLoadScript::update(){ +bool ShopLoadScript::update() { SaveManager & save = this->get_save_manager(); - ValueBroker buy_bullet = save.get(BUY_BULLET_SAVE,0); - ValueBroker buy_bubble = save.get(BUY_BUBBLE_SAVE,0); + ValueBroker buy_bullet = save.get(BUY_BULLET_SAVE, 0); + ValueBroker buy_bubble = save.get(BUY_BUBBLE_SAVE, 0); - - if(buy_bullet.get()){ + if (buy_bullet.get()) { auto sprites = this->get_components_by_tag(BUY_BULLET); - for(auto sprite : sprites){ + for (auto sprite : sprites) { sprite.get().active = false; } auto buttons = this->get_components_by_tag