#include "ShopLoadScript.h" #include #include "api/Button.h" #include "api/Sprite.h" #include "Shopconfig.h" #include "api/Text.h" #include "manager/SaveManager.h" using namespace crepe; using namespace std; void ShopLoadScript::init() { this->update(); this->subscribe([this](const ShopUpdate e) { return this->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); if(buy_bullet.get()){ auto sprites = this->get_components_by_tag(BUY_BULLET); for(auto sprite : sprites){ sprite.get().active = false; } auto buttons = this->get_components_by_tag