diff --git a/src/game_ui.cpp b/src/game_ui.cpp new file mode 100644 index 0000000..5dab0d6 --- /dev/null +++ b/src/game_ui.cpp @@ -0,0 +1,34 @@ +#include "game_ui.hpp" +#include "godot_cpp/classes/label.hpp" +#include "godot_cpp/variant/utility_functions.hpp" +#include "rally_rush_game_mode.hpp" +#include "utils/game_root.hpp" +#include "utils/godot_macros.h" + +namespace godot { +void GameUI::_bind_methods() { +#define CLASSNAME GameUI +} + +void GameUI::_enter_tree() { GDGAMEONLY(); + Ref game_mode{GameRoot3D::get_singleton()->get_game_mode()}; + game_mode->connect("key_found", callable_mp(this, &GameUI::on_key_found)); + game_mode->connect("all_keys_found", callable_mp(this, &GameUI::on_all_keys_found)); + this->debug_info_label = this->get_node