CCSpriteFrame *frame;
frames = new CCMutableArray<CCSpriteFrame*>(frameNum);
for (int i=0; i < frameNum; i++) { frame* = CCSpriteFrame::frameWithTexture(texture, CCRectMake(x, y, w, h));*
frames->addObject(frame*);* frame*->release();* }
CCAnimation *anmation = CCAnimation::animationWithFrames(frames,0.1f); CCAnimate *anmate = CCAnimate::actionWithAnimation(anmation); CCAction *action = CCRepeatForever::actionWithAction(anmate); sprite->runAction(action);
我像这样去创建动画。如果我的某一帧有几个图块,该怎么办啊。