class CObject
{
public:
asCScriptString* name;
int x,y,width,height;
bool m_bVisible;
bool getVisible() {return m_bVisible;};
void setVisible(bool bVisible) {m_bVisible=bVisible;};
CSeat() {name = new asCScriptString;};
~CSeat() {};
};
is it possible to register the functions "getVisible" and "setVisible" likes it behaves as properties in angelscript?
script example:
CObject myObj;
myObj.visible = true;
In this case there doesn't happen much in getVisible nor setVisible but it's only an example.
Thanks,
Rene
🎉 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!
register class methods as properties
Not yet. This is feature I have planned for the future, but it requires some other changes that I need to complete first, so it will be quite a while before I get to this.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement