I was reading a couple of older threads from 2008, 2010 and wanted to verify that script classes cannot inherit from application defined non-abstract base classes. The question of “why” also came up. I'd like to allow script developers the flexibility to extend/specialize base classes that are implemented in the application interface. I also read some references to registering an interface with AS, but as far as I could tell this would not allow inheritance of base class functionality. Please comment.
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Script classes inheriting from application class
It's not possible to directly inherit from application registered classes. The reason being that script classes simply doesn't work exactly like C++ classes.
However, with a little bit of glue code you make it work as if an inheritance happens. The manual has an article that shows how this works:
http://www.angelcode.com/angelscript/sdk/docs/manual/doc_adv_inheritappclass.html
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement