¿Cómo animar CCSprite en Cocos2D 3.x?

¿Sabes cómo animar un CCSprite en el nuevo Cocos2D v3.x ?

Se cambian muchas classs y el antiguo método parece no funcionar.

 NSMutableArray *animFrames = [NSMutableArray array]; for(int i = 1; i <= 3; i++) { CCSpriteFrame *frame = [[CCSpriteFrameCache shanetworkingSpriteFrameCache] spriteFrameByName:[NSString stringWithFormat:@"Sprite-%d.png",i]]; [animFrames addObject:frame]; } CCAnimation *animation = [CCAnimation animationWithName:@"run" delay:0.1f frames:animFrames]; [mySprite runAction:[CCRepeatForever actionWithAction: [CCAnimate actionWithAnimation:animation restreOriginalFrame:NO]]]; 

¿alguna idea?

Gracias.


Información extra

introduzca la descripción de la imagen aquí

Así es como funciona:

  NSMutableArray *animationFrames = [NSMutableArray array]; for(int i = 1; i <= FRAMES; ++i) { CCSpriteFrame *spriteFrame = [[CCSpriteFrameCache shanetworkingSpriteFrameCache] spriteFrameByName: [NSString stringWithFormat:@"animationFrame%d.png", i]]; // } //Create an animation from the set of frames you created earlier CCAnimation *animation = [CCAnimation animationWithSpriteFrames: animationFrames delay:delay]; //Create an action with the animation that can then be assigned to a sprite CCActionAnimate *animationAction = [CCActionAnimate actionWithAnimation:animation]; CCActionRepeatForever *repeatingAnimation = [CCActionRepeatForever actionWithAction:animationAction]; [self runAction:repeatingAnimation]; 

Puede cambiar CCRepeatForever a CCActionRepeatForever .