From fcae8934916c9f429e58c8e178ab14fcf65a2bbc Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Tue, 7 Jan 2025 11:20:58 +0100 Subject: added end game --- game/menus/endgame/EndGameSubScript.cpp | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 game/menus/endgame/EndGameSubScript.cpp (limited to 'game/menus/endgame/EndGameSubScript.cpp') diff --git a/game/menus/endgame/EndGameSubScript.cpp b/game/menus/endgame/EndGameSubScript.cpp new file mode 100644 index 0000000..2be6931 --- /dev/null +++ b/game/menus/endgame/EndGameSubScript.cpp @@ -0,0 +1,51 @@ +#include "EndGameSubScript.h" +#include "../IFloatingWindowScript.h" +#include "api/Button.h" +#include "api/Sprite.h" +#include "api/Text.h" +#include "types.h" +#include "../../Events.h" +#include + +using namespace crepe; + +EndGameSubScript::EndGameSubScript(const std::string & tag){ + this->tag = tag; +} + +void EndGameSubScript::init(){ + this->disable_all(); + this->subscribe([this](const EndGameEvent e) { return this->enable_all(); }); + this->subscribe([this](const EndGameEvent e) { return this->reset_timescale(); }); +} + +bool EndGameSubScript::disable_all(){ + IFloatingWindowScript::disable_all_sprites(); + RefVector