1

私がこれを行うとき:

[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」がアクションを一時停止することを期待しますが、そうではないようです。

4

2 に答える 2

2

[[CCDirector sharedDirector] pause];すべてのアニメーションと動きを一時停止する必要があります。

于 2013-09-27T17:21:40.070 に答える