Add support for virtual and abstract classes
This commit is contained in:
@@ -107,4 +107,18 @@ public:
|
||||
|
||||
VARIANT_ENUM_CAST(Example, Constants);
|
||||
|
||||
class ExampleVirtual : public Object {
|
||||
GDCLASS(ExampleVirtual, Object);
|
||||
|
||||
protected:
|
||||
static void _bind_methods() {}
|
||||
};
|
||||
|
||||
class ExampleAbstract : public Object {
|
||||
GDCLASS(ExampleAbstract, Object);
|
||||
|
||||
protected:
|
||||
static void _bind_methods() {}
|
||||
};
|
||||
|
||||
#endif // EXAMPLE_CLASS_H
|
||||
|
||||
@@ -24,6 +24,8 @@ void initialize_example_module(ModuleInitializationLevel p_level) {
|
||||
ClassDB::register_class<ExampleRef>();
|
||||
ClassDB::register_class<ExampleMin>();
|
||||
ClassDB::register_class<Example>();
|
||||
ClassDB::register_class<ExampleVirtual>(true);
|
||||
ClassDB::register_abstract_class<ExampleAbstract>();
|
||||
}
|
||||
|
||||
void uninitialize_example_module(ModuleInitializationLevel p_level) {
|
||||
|
||||
Reference in New Issue
Block a user