对于Spawn ,我们只需要把RepeatForever动作拿出来单独执行即可
Animation *animation = Animation::createWithSpriteFrames(aniframe,0.1f);
Animate *animate = Animate::create(animation);
aniSprite->runAction(RepeatForever::create((ActionInterval *)animate));
aniSprite->runAction(MoveTo::create(5,PointMake(visibleSize.width-40, visibleSize.height/2)));
对于Sequence,则要使用回调函数来执行RepeatForever动作
CallFunc *callfunc = CallFunc::create(this,callfunc_selector(HelloWorld::animateCallback));
Action * seq = Sequence::create(MoveTo::create(5,PointMake(visibleSize.width-40, visibleSize.height/2)),callfunc,NULL);aniSprite->runAction(seq);