是否支持向引擎注册类的时候继承已有类? #90
Answered
by
LanderlYoung
Redbeanw44602
asked this question in
Q&A
-
如果支持,在某些情景下将极大的便利开发,但文档里似乎没有提到有相关功能。 const ClassDefine<AnimalClass> AnimalClassBuilder =
defineClass<AnimalClass>("Animal")
.constructor()
.instanceFunction("walk", &AnimalClass::walk)
.build();
const ClassDefine<PeopleClass> PeopleClassBuilder =
defineClass<PeopleClass>("People")
.constructor()
.instanceFunction("think", &PeopleClass::think)
.build();
// 可否让 PeopleClass 继承 AnimalClass,并使用 People.walk? |
Beta Was this translation helpful? Give feedback.
Answered by
LanderlYoung
Feb 17, 2023
Replies: 2 comments
-
暂时还没有支持继承,子类需要完全绑定 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LanderlYoung
-
感谢回复。希望考虑添加相关支持,谢谢! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
暂时还没有支持继承,子类需要完全绑定