【Cocos2d-x-基础概念】Animations
#Cocos2d-x-基本概念-Animations ###帧动画 你可以通过一系列的图片来创建一个童话,如下 CCAnimation *animation = CCAnimation:create(); //load image file from local system to CCSpriteFrame, then add into CCAnimation for (int i = 0; i < 15; ++i) { char szImageFileName[128] = {0}; sprintf(szImageFileName, "Images/grossini_dance_%02d.png", i); animation->addSpriteFrameWithFilename(szImageFileName); } animation->setDelayPerUnit(2.8f / 14.0f);// This animation contains 14 frames, will continuous 2.8 seconds. animation->setRestoreOriginalFrame(true);// Return to the 1st frame after the 14th frame is played. CCAnimate *action =