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:
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user