Añadir funcion de prueba y enlazarla para su llamada desde gdscript

Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
2023-02-16 21:57:27 +01:00
parent 62e3977704
commit 17530e09f2
5 changed files with 35 additions and 3 deletions

View File

@ -1 +1,12 @@
#include "test.h"
#include <godot_cpp/variant/utility_functions.hpp>
void Test::start_test() {
UtilityFunctions::print("Hello world form GDExtension");
}
void Test::_bind_methods() {
ClassDB:
ClassDB::bind_method(D_METHOD("start_test"), &Test::start_test);
}

View File

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