How can I register static method of class by angelscript ?
Seems the same question of registering enum ~~ :)
Class A
{
static float SomeFunc( ) { return 1.0f; }
};
How to register A::SomeFunc( ) ? thanks !!!
A static class method really is a global function, so that's how you register it with AngelScript:
Regards,
Andreas
engine->RegisterGlobalFunction("float SomeFunc()", asFUNCTION(A::SomeFunc), asCALL_CDECL);
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement