#include "spawn_point.hpp" #include "game_root.hpp" namespace utils { void SpawnPoint3D::_bind_methods() { } void SpawnPoint3D::_enter_tree() { GameRoot3D *root = gd::Object::cast_to(GameRoot3D::get_singleton()); if(root == nullptr) { return; } root->register_spawn_point(this); } void SpawnPoint3D::_exit_tree() { GameRoot3D *root = Object::cast_to(GameRoot3D::get_singleton()); if(root == nullptr) { return; } root->unregister_spawn_point(this); } }