我發現它:
AtlasSpriteManager *mgr = [AtlasSpriteManager spriteManagerWithFile:@"ax.png" capacity:6];
AtlasSprite *sprite = [AtlasSprite spriteWithRect:CGRectMake(0, 0, 200, 200) spriteManager:mgr];
[sprite setTransformAnchor:ccp(0,0)];
sprite.position = ccp(100,100);
[mgr addChild:sprite z:0];
// Add manager to this layer
[self addChild:mgr z:3];
// Create animation
AtlasAnimation* animation = [AtlasAnimation animationWithName:@"testAnimation" delay:0.1];
assert(animation != nil);
// Define the frames in the sprite sheet used for the animation
[animation addFrameWithRect:CGRectMake(0, 0, 200, 200)];
[animation addFrameWithRect:CGRectMake(300, 0, 200, 200)];
[animation addFrameWithRect:CGRectMake(400, 0, 200, 200)];
[animation addFrameWithRect:CGRectMake(500, 0, 200, 200)];
[animation addFrameWithRect:CGRectMake(600, 0, 200, 200)];
[animation addFrameWithRect:CGRectMake(700, 12, 200, 200)];
id action = [Animate actionWithAnimation:animation];
assert(action != nil);
// Run the animation
id repeatAction = [Repeat actionWithAction:action times:100];
// To repeat forever, use this
// id repeatAction = [RepeatForever actionWithAction:action];
[sprite runAction:repeatAction];