diff --git a/game_engine.hpp b/game_engine.hpp index 20c5187..e0d5d5b 100644 --- a/game_engine.hpp +++ b/game_engine.hpp @@ -24,7 +24,6 @@ enum class GameBonus { }; class GameEngine : DeadSimpleFSM { - std::map damage_types{ {"error", 4}, {"warning", 1}, diff --git a/gui.cpp b/gui.cpp index 4abc339..c046c24 100644 --- a/gui.cpp +++ b/gui.cpp @@ -16,7 +16,9 @@ using std::string, std::vector; -GUI::GUI(SFMLBackend &backend) : sfml(backend) { +GUI::GUI(SFMLBackend &backend, int timer_seconds) : + sfml(backend), $timer_seconds(timer_seconds) +{ using namespace guecs; $gui.position(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); @@ -44,7 +46,7 @@ GUI::GUI(SFMLBackend &backend) : sfml(backend) { auto log = $gui.entity("log"); auto& rect = $gui.get(log); rect.color = {255,255,255,255}; - $gui.set(log, {1000.0, "build_status"}); + $gui.set(log, {(float)$timer_seconds, "build_status"}); auto clock = $gui.entity("clock"); $gui.set