当我这样做时:
[gameLayer pauseSchedulerAndActions];
大多数游戏会暂停,但正在进行此操作的精灵不会暂停旋转:
[sprite runAction:[CCRepeatForever actionWithAction:[CCRotateBy actionWithDuration:5.0 angle: 360]]];
此外,那些运行 CCAnimations 的精灵不会停止动画:
CCAnimation *theAnim = [CCAnimation animationWithSpriteFrames:theFrames delay:0.1];
CCSprite *theOverlay = [CCSprite spriteWithSpriteFrameName:@"whatever.png"];
self.theAction = [CCRepeatForever actionWithAction:[CCAnimate actionWithAnimation:theAnim]];
游戏暂停时如何让这些暂停?我希望“pauseSchedulerAndActions”能够暂停操作,但似乎并非如此。