🎉 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

Started by
0 comments, last by WitchLord 15 years, 9 months ago

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
Advertisement
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.




AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement