INITIALIZED TEMPLATE

This commit is contained in:
Sara Gerretsen 2025-12-21 14:50:06 +01:00
parent d87b782d6d
commit f3c2bf7515
10 changed files with 19 additions and 19 deletions

3
modules/authority/SCsub Normal file
View file

@ -0,0 +1,3 @@
Import('env')
env.add_source_files(env.modules_sources, "*.cpp")

View file

@ -0,0 +1,5 @@
def can_build(env, platform):
return True;
def configure(env):
pass;

View file

@ -0,0 +1,20 @@
#ifndef GODOT_EXTRA_MACROS_H
#define GODOT_EXTRA_MACROS_H
#define BIND_GET_SET(m_property) \
ClassDB::bind_method(D_METHOD("set_" #m_property, #m_property), \
&self_type::set_##m_property); \
ClassDB::bind_method(D_METHOD("get_" #m_property), \
&self_type::get_##m_property)
#define BIND_HPROPERTY(m_type, m_property, ...) \
BIND_GET_SET(m_property); \
ADD_PROPERTY(PropertyInfo(m_type, #m_property, __VA_ARGS__), \
"set_" #m_property, "get_" #m_property)
#define BIND_PROPERTY(m_type, m_property) \
BIND_GET_SET(m_property); \
ADD_PROPERTY(PropertyInfo(m_type, #m_property), "set_" #m_property, \
"get_" #m_property)
#endif // !GODOT_EXTRA_MACROS_H

View file

@ -0,0 +1,15 @@
#include "register_types.h"
#include "core/object/class_db.h"
void initialize_authority_module(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return;
}
}
void uninitialize_authority_module(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return;
}
}

View file

@ -0,0 +1,9 @@
#ifndef authority_REGISTER_TYPES_H
#define authority_REGISTER_TYPES_H
#include "modules/register_module_types.h"
void initialize_authority_module(ModuleInitializationLevel p_level);
void uninitialize_authority_module(ModuleInitializationLevel p_level);
#endif // !authority_REGISTER_TYPES_H