Raised This Month: $ Target: $400
 0% 

New API and Syntax


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-30-2016 , 00:42   Re: New API and Syntax
Reply With Quote #11

Is it possible to do static properties in methodmaps?

Eg:

Code:
static int s_CollectionSize = 0;

methodmap BaseCollection
{
	public BaseCollection()
	{
		return view_as<BaseCollection>(0);
	}

	static property int Size
	{
		public get()
		{
			return s_CollectionSize;
		}
		public set(int value)
		{
			s_CollectionSize = value;
		}
	}
}
I wish to be able to do the below without having to make an methodmap instance.

Code:
BaseCollection.Size = 666;
PrintToServer("BaseCollection.Size=%d", BaseCollection.Size);
__________________

Last edited by Neuro Toxin; 01-01-2017 at 20:39.
Neuro Toxin is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode