Fix _notification with parent and child classes

This commit is contained in:
David Snopek
2024-02-02 10:07:45 -06:00
parent f90085917b
commit 23c010900c
6 changed files with 62 additions and 2 deletions

View File

@@ -220,6 +220,31 @@ protected:
virtual int test_function() override { return 25; }
};
class ExampleBase : public Node {
GDCLASS(ExampleBase, Node);
protected:
int value1 = 0;
int value2 = 0;
static void _bind_methods();
void _notification(int p_what);
public:
int get_value1() { return value1; }
int get_value2() { return value2; }
};
class ExampleChild : public ExampleBase {
GDCLASS(ExampleChild, ExampleBase);
protected:
static void _bind_methods() {}
void _notification(int p_what);
};
class ExampleRuntime : public Node {
GDCLASS(ExampleRuntime, Node);