Raised This Month: $ Target: $400
 0% 

[TUT] Better Methodmaps tut


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-09-2016 , 08:14   Re: [TUT] Better Methodmaps tut
Reply With Quote #15

Quote:
Originally Posted by StSatan View Post
So in "normal" situation we can simply increase array:

PHP Code:
iHealth[index]++ 
or decrease

PHP Code:
iHealth[index]-- 
but with using methodmaps we can't type:

PHP Code:
index.Health++ 
am I right?
Nope.
Basically, what happens is SP will get the return value from the get() method and increment that by one, then it will call the set() method with the new value.
example:
PHP Code:
T.LOL.set(tT.LOL.get(t)++); //T is methodmap, LOL is property(type int), t is variable(type T) 

Last edited by WildCard65; 02-09-2016 at 08:14.
WildCard65 is offline
 



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 22:06.


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