Quote:
Originally Posted by StSatan
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:
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(t, T.LOL.get(t)++); //T is methodmap, LOL is property(type int), t is variable(type T)