🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
How can I register operator function of class ?
class A
{
operator int( )
{
// do something ...
}
};
How to register this in angelscript ? thansk !!!
Documentation
For your particular example you would register it as:
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 );
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement