Advertisement

How can I register static method of class by angelscript ?

Started by February 20, 2008 10:07 PM
1 comment, last by zopenge 16 years, 9 months ago
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:

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

Advertisement
Thanks for help so much ~ :)

This topic is closed to new replies.

Advertisement