Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

register class methods as properties

Started by _rene_b_ Sep 26, 2008 at 5:32 PM 0 replies 1k views
Original Post
_rene_b_
_rene_b_

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
WitchLord
WitchLord
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 - <a href="http://www.angelcode.com/tower" rel

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.