标签:cocos2dx animation animate repeatforever
小鸟一直在扑翅膀的代码块:
auto sprite = Sprite::create(); Animation *animation = Animation::create(); animation->addSpriteFrameWithFileName("bird_blue_1.png"); animation->addSpriteFrameWithFileName("bird_blue_2.png"); animation->addSpriteFrameWithFileName("bird_blue_0.png"); animation->setLoops(-1); animation->setDelayPerUnit(0.5/3.0); animation->setRestoreOriginalFrame(true); Animate *animate = Animate::create(animation); sprite->runAction(RepeatForever::create(animate));
[cocos2d-x]-会动的精灵,布布扣,bubuko.com
标签:cocos2dx animation animate repeatforever
原文地址:http://blog.csdn.net/czjuttsw/article/details/28247525