denniss
denniss

Reputation: 17599

cocos2d scheduler interval vs delay

I am trying to understand the difference between interval and delay in cocos2d's scheduler.

If delay is the time between 2 selectors get executed. What is interval really?

Upvotes: 2

Views: 1102

Answers (1)

Guru
Guru

Reputation: 22042

Comments in cocos2D CCNode.h file, may be useful.

Schedules a custom selector with an interval time in seconds /** repeat will execute the action repeat + 1 times, for a continues action use kCCRepeatForever delay is the amount of time the action will wait before execution */

If the selector is already scheduled, then the interval parameter will be updated without scheduling it again.

-(void) schedule:(SEL)selector interval:(ccTime)interval repeat: (uint) repeat delay:(ccTime) delay;

Upvotes: 2

Related Questions