Advertisement

How can I register operator function of class ?

Started by March 06, 2008 12:05 AM
1 comment, last by zopenge 16 years, 11 months ago
class A { operator int( ) { // do something ... } }; How to register this in angelscript ? thansk !!!
Documentation

For your particular example you would register it as:

r = engine->RegisterObjectBehaviour("type", asBEHAVE_VALUE_CAST, "int f()", asMETHOD(A, operator int), asCALL_THISCALL); assert( r >= 0 );

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
Oh, Thanks so so so much :)

This topic is closed to new replies.

Advertisement