Formateo del código

Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
Somebody Master 2023-02-12 14:04:31 +01:00
parent bca8e245b5
commit 7c5d89d711
Signed by: somebody_master
GPG Key ID: 78315CFDF0B25505
2 changed files with 15 additions and 21 deletions

View File

@ -16,33 +16,27 @@
using namespace godot; using namespace godot;
void initialize_test_module(ModuleInitializationLevel p_level) { void initialize_test_module(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return; return;
} }
ClassDB::register_class<Test>(); ClassDB::register_class<Test>();
} }
void uninitialize_test_module(ModuleInitializationLevel p_level) { void uninitialize_test_module(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return; return;
} }
} }
extern "C" { extern "C" {
// Initialization. // Initialization.
GDExtensionBool GDE_EXPORT GDExtensionBool GDE_EXPORT test_library_init(const GDExtensionInterface *p_interface, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) {
test_library_init(const GDExtensionInterface *p_interface, godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization);
GDExtensionClassLibraryPtr p_library, init_obj.register_initializer(initialize_test_module);
GDExtensionInitialization *r_initialization) { init_obj.register_terminator(uninitialize_test_module);
godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE);
r_initialization);
init_obj.register_initializer(initialize_test_module); return init_obj.init();
init_obj.register_terminator(uninitialize_test_module);
init_obj.set_minimum_library_initialization_level(
MODULE_INITIALIZATION_LEVEL_SCENE);
return init_obj.init();
} }
} }

View File

@ -6,10 +6,10 @@
using namespace godot; using namespace godot;
class Test : public Node3D { class Test : public Node3D {
GDCLASS(Test, Node3D); GDCLASS(Test, Node3D);
protected: protected:
static void _bind_methods() {} static void _bind_methods() {}
}; };
#endif #endif