#include "level.hpp" #include "godot_cpp/core/class_db.hpp" #include "utils/godot_macros.hpp" #include namespace utils { void Level3D::_bind_methods() { #define CLASSNAME Level3D GDPROPERTY_HINTED(game_mode_prototype, gd::Variant::OBJECT, gd::PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"); } void Level3D::set_game_mode_prototype(gd::Ref prototype) { if(prototype.is_null() || !prototype.is_valid()) this->game_mode_prototype = gd::Ref(nullptr); else if(!gd::ClassDB::is_parent_class(prototype->get_state()->get_node_type(0), "GameMode")) return; else this->game_mode_prototype = prototype; } gd::Ref Level3D::get_game_mode_prototype() const { return this->game_mode_prototype; } }