我想知道,如何更改CCAnimation中的延遲?更改CCAnimation中的延遲
_monstrAnim = [CCAnimation animationWithFrames:monstrAnimFrames delay:0.1f];
self.monstr = [CCSprite spriteWithSpriteFrameName: [NSString stringWithFormat:@"monstr_%d_1.png", currentLevel]];
self.walkAction = [CCRepeatForever actionWithAction:[CCAnimate actionWithAnimation:_monstrAnim restoreOriginalFrame:NO]];
[self.monstr runAction:self.walkAction];
[monstrSpriteSheet addChild:self.monstr z:1];
這個工作正常,但我應該改變FPS的速度和我的工作...
[self.monstr stopAllActions]; [self.monstr runAction:self.walkAction]; [self.monstrAnim setDelay:1];
,但什麼都沒有發生......
你什麼時候運行第二個代碼?除非您保留CCAnimation,否則它很可能會在運行後發佈。 – jonsibley 2012-03-30 16:18:13