made first godot api function

This commit is contained in:
2023-03-11 20:07:41 +01:00
parent a80244b4db
commit 5b411af245
2 changed files with 5 additions and 3 deletions

View File

@@ -48,9 +48,7 @@ int Example::def_args(int p_a, int p_b) {
return p_a + p_b; return p_a + p_b;
} }
void Example::_notification(int p_what) {
UtilityFunctions::print("Notification: ", String::num(p_what));
}
bool Example::_set(const StringName &p_name, const Variant &p_value) { bool Example::_set(const StringName &p_name, const Variant &p_value) {
String name = p_name; String name = p_name;
@@ -335,3 +333,6 @@ bool Example::_has_point(const Vector2 &point) const {
return false; return false;
} }
void Example::_ready() {
UtilityFunctions::print("this is a test");
}

View File

@@ -122,6 +122,7 @@ public:
// Virtual function override (no need to bind manually). // Virtual function override (no need to bind manually).
virtual bool _has_point(const Vector2 &point) const override; virtual bool _has_point(const Vector2 &point) const override;
void _ready();
}; };
VARIANT_ENUM_CAST(Example::Constants); VARIANT_ENUM_CAST(Example::Constants);