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.
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
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement