标签:
Size visivleSize = Director::getInstance()->getVisibleSize(); Sprite* sprite = Sprite::create("sprite.png"); sprite->setPosition(Point(visivleSize.width / 2, visivleSize.height / 2)); addChild(sprite); JumpBy* jumpBy = JumpBy::create(3.0f, Point(50, 1), 100, 1); RepeatForever* repeatForeverAction = RepeatForever::create(jumpBy); //Repeat * repeatAction = Repeat::create(jumpBy, 3); sprite->runAction(repeatForeverAction);
Repeat * repeatAction = Repeat::create(jumpBy, 5); sprite->runAction(repeatAction);
Roope的Cocos2d-x学习之旅 003:无限重复和有限重复动作——RepeatForever和Repeat
标签:
原文地址:http://blog.csdn.net/ricardo_he/article/details/44781657