package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
781 B
25 lines
781 B
6 months ago
|
#include <godot_cpp/classes/global_constants.hpp>
|
||
|
#include <godot_cpp/classes/ref_counted.hpp>
|
||
|
#include <godot_cpp/core/binder_common.hpp>
|
||
|
|
||
|
using namespace godot;
|
||
|
|
||
|
class ExampleRef : public RefCounted {
|
||
|
GDCLASS(ExampleRef, RefCounted);
|
||
|
|
||
|
protected:
|
||
|
static void _bind_methods() {
|
||
|
ClassDB::bind_method(D_METHOD("get_id"), &ExampleRef::get_id);
|
||
|
}
|
||
|
|
||
|
public:
|
||
|
int get_id() { return 5; }
|
||
|
};
|
||
|
|
||
|
extern "C" {
|
||
|
GDExtensionBool GDE_EXPORT example_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) {
|
||
|
godot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);
|
||
|
return init_obj.init();
|
||
|
}
|
||
|
}
|