Can we change dynamically the interval of "schedule" ?
Posted
by micropsari
on Stack Overflow
See other posts from Stack Overflow
or by micropsari
Published on 2010-04-23T22:15:32Z
Indexed on
2010/04/23
22:23 UTC
Read the original article
Hit count: 295
Hello,
I'm making a game on iPhone using cocos2d, and I have a question.
In my init method I'm doing this :
[self schedule:@selector(newMonster:) interval:1];
It create a new monster every second.
But I'd like that the interval change over time. For example :
-The 10 first seconds of the game: a new monster appears every 1 second.
-Then for 10 seconds: a new monster appears every 0.8 second.
-And after every 0.5 second...
How can I do that?
Thanks !
© Stack Overflow or respective owner