Jul*_*per 3 iphone objective-c intervals cocos2d-iphone
在cocos2d中使用默认(空白)interval参数创建计时器时:
[self schedule:(update)];
//Not a 100% sure this code is correct, but you know what i mean
Run Code Online (Sandbox Code Playgroud)
计时器运行的间隔是什么,我认为是1/60,但我不确定.
这取决于您的CCDirector设置.如果你正在使用
[[CCDirector sharedDirector] setAnimationInterval:1.0/60];
Run Code Online (Sandbox Code Playgroud)
要么
CC_DIRECTOR_INIT();
Run Code Online (Sandbox Code Playgroud)
然后每1/60秒调用一次update方法.