//1.定义动画的帧
Vector<SpriteFrame *> allFrame;
for (int i=1; i<=8; i++)
{SpriteFrame *sf=SpriteFrame::create(StringUtils::format("run%d.png",i), Rect(0,0,135,80));
allFrame.pushBack(sf);
}
//2.定义动画对象
Animation*
animation1=Animation::createWithSpriteFrames(allFrame);
animation1->setDelayPerUnit(0.1);
//3.根据动画创建动作
Animate *
animate1=Animate ::create(animation1);
//4.让一个
Action *
act=RepeatForever::create(animate1);
lp->runAction(act);
lp->setScale(2);