how use the enum of class by angelscript ?
Class A
{
enum _CODE
{
_CODE_NONE,
_CODE_ONE
}
};
how can i register this by angelscript ? Thanks so much ! :)
Currently you can only do this by declaring constants in the script, e.g.:
However, as of the next release AngelScript will support true enums. Digital_Asphyxia already sent me the code that implements this support, I just have to include it in the library. Hopefully, by the end of the week, the WIP version in SVN will already have the support.
Regards,
Andreas
const char *scriptConstants = "const int _CODE_NONE = 0; const int _CODE_ONE = 1;";engine->AddScriptSection(module, "constants", scriptConstants, strlen(scriptConstants));// Add the normal script section to the same module, then build it
However, as of the next release AngelScript will support true enums. Digital_Asphyxia already sent me the code that implements this support, I just have to include it in the library. Hopefully, by the end of the week, the WIP version in SVN will already have the support.
Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
Thanks for reply :)
That's a good news for angelscript ~~ I hope we can use the real enum for the next version ~~ thanks for your work ~ I really like AS :)
That's a good news for angelscript ~~ I hope we can use the real enum for the next version ~~ thanks for your work ~ I really like AS :)
I added preliminary support for enum to the WIP version in SVN now. I'll be doing some more modifications to it, but I'd be grateful for any additional testing I can get before I release the next version.
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