How can I register static method of class by angelscript ?

Started by
1 comment, last by zopenge 16 years, 2 months ago
Seems the same question of registering enum ~~ :) Class A { static float SomeFunc( ) { return 1.0f; } }; How to register A::SomeFunc( ) ? thanks !!!
Advertisement
A static class method really is a global function, so that's how you register it with AngelScript:

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

Thanks for help so much ~ :)

This topic is closed to new replies.

Advertisement