fix: KeyPickup::_enter_tree no longer runs in editor

This commit is contained in:
Sara 2024-05-17 16:08:29 +02:00
parent 3a0a86f5e3
commit 494b389268

View file

@ -2,13 +2,14 @@
#include "car_player.hpp" #include "car_player.hpp"
#include "rally_rush_game_mode.hpp" #include "rally_rush_game_mode.hpp"
#include "utils/game_root.hpp" #include "utils/game_root.hpp"
#include "utils/godot_macros.h"
namespace godot { namespace godot {
void KeyPickup::_bind_methods() { void KeyPickup::_bind_methods() {
#define CLASSNAME KeyPickup #define CLASSNAME KeyPickup
} }
void KeyPickup::_enter_tree() { void KeyPickup::_enter_tree() { GDGAMEONLY();
this->connect("body_entered", callable_mp(this, &KeyPickup::on_body_entered)); this->connect("body_entered", callable_mp(this, &KeyPickup::on_body_entered));
} }