We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d1d86d commit b535055Copy full SHA for b535055
cocos2d-ui-tests/tests/CCSchedulerTest.m
@@ -41,6 +41,10 @@ -(void)onEnter
41
[super onEnter];
42
43
[self schedule:@selector(after:) interval:2.0];
44
+
45
+ // Unschedule it and reschedule it to check for rescheduling issues.
46
+ [self unschedule:@selector(after:)];
47
+ [self schedule:@selector(after:) interval:1.0];
48
}
49
50
-(void)update:(CCTime)delta
cocos2d/CCScheduler.m
@@ -504,7 +504,7 @@ -(NSArray *)timersForTarget:(NSObject<CCSchedulerTarget> *)target
504
505
NSMutableArray *arr = [NSMutableArray array];
506
for(CCTimer *timer = scheduledTarget.timers; timer; timer = timer.next){
507
- [arr addObject:timer];
+ if(!timer.invalid) [arr addObject:timer];
508
509
510
return arr;
0 commit comments