registering virtual properties

Started by
1 comment, last by _Engine_ 11 years, 5 months ago
Hi!

I can declare global class throught binding with c++ code. Can i bind virtual properties? I don't find any clue in documentation about this feature (((
Advertisement
Virtual properties are registered with the engine by registering a pair of get and set functions. For example:


engine->RegisterGlobalFunction("int get_GlobProp()", asFUNCTION(get_GlobProp), asCALL_CDECL);
engine->RegisterGlobalFunction("void set_GlobProp(int)", asFUNCTION(set_GlobProp), asCALL_CDECL);

engine->RegisterObjectMethod("Obj", "int get_ObjProp()", asMETHOD(Obj, get_ObjProp), asCALL_THISCALL);
engine->RegisterObjectMethod("Obj", "void set_ObjProp(int)", asMETHOD(Obj, set_ObjProp), asCALL_THISCALL);


Manual entries describing this:
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

Yep, this is working :)

Thank you.

This topic is closed to new replies.

Advertisement