self.boxesOnLift = [NSMutableArray array];
[self init];
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"Animation.plist"];
NSMutableArray *walkAnimFrames = [NSMutableArray array];
for(int i = 1; i <= 9; ++i)
{
[walkAnimFrames addObject:[[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:
[NSString stringWithFormat:@"lift%d.png", i]]];
}
self.animation = [CCAnimation animationWithFrames:walkAnimFrames delay:0.1f];
self.lift = [CCSprite spriteWithSpriteFrameName:@"lift1.png"];
self.lift.position = ccp(0, 0);
self.walkAction = [CCRepeatForever actionWithAction: [CCAnimate actionWithAnimation:walkAnim restoreOriginalFrame:NO]];
[self.lift runAction:_walkAction];
[self addChild:self. lift];
我可以在当前位置暂停动画吗?我可以在这个位置恢复我的行动吗?