I obviously know how to use NSTimers, and cocos2d timers , such as :
[self schedule: @selector(updater:) interval:0.5];
but all this timers call a function. i dont want that .
i need a timer that within my method will count, and at the end, will do one operation such as toggle a BOOL , or change an integer.
is there a simple way to do that in 1 line ?
thanks a lot
Try this:
example
or if you are using older version of cocos2d