我想知道,如何更改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