标签:height run col interval 缩放 create ble dir 指定位置
1、action中的to是只能用一次,而by是可以一直使用。
2、reverse(),是反过来实现,而这个并不是所有的动作都存在的。
//运动到一个指定的坐标点 //CCActionInterval * moveBy = CCMoveBy::create(5, Vec2(-sprite1->getPosition().x * 2 + Director::getInstance()->getVisibleSize().width, // 50)); //CCActionInterval * actionMoveBack = moveBy->reverse(); //sprite1->runAction(moveBy); ////sprite1->runAction(actionMoveBack); //实现缩放 //CCActionInterval * scaleTo = ScaleTo::create(2, 0.5); //sprite1->runAction(scaleTo); //CCActionInterval * scaleBy = ScaleBy::create(1, 0.5); //CCActionInterval * backScaleBy = scaleBy->reverse(); //sprite1->runAction(backScaleBy); //实现指定大小角度的倾斜 //CCActionInterval * rotateTo = RotateTo::create(3, 350); //sprite1->runAction(rotateTo); //实现在指定时间到达指定位置以每次多高的跳跃跳跃多少次。 //CCActionInterval * jempTo = CCJumpTo::create(5, Vec2(Director::getInstance()->getVisibleSize().width - sprite1->getPosition().x * 2, // Director::getInstance()->getVisibleSize().height / 2), 100, 10); //sprite1->runAction(jempTo); //bezier运动 //ccBezierConfig bezier; //bezier.controlPoint_1 = Vec2(100, 50); //bezier.controlPoint_2 = Vec2(300, 200); //bezier.endPosition = Vec2(400, 300); //CCActionInterval * bezierTo = CCBezierTo::create(2, bezier); //sprite1->runAction(bezierTo); //渐变 //CCActionInterval * fadein = FadeIn::create(2); //sprite1->runAction(fadein); //CCActionInterval * fadeOut = FadeOut::create(2); //sprite1->runAction(fadeOut); //色彩渐变 //CCActionInterval * tintTo = TintTo::create(2, 255, 255, 0); //sprite1->runAction(tintTo); //CCActionInterval * tintBy = TintBy::create(2, 255, 0, 0); //sprite1->runAction(tintBy);
标签:height run col interval 缩放 create ble dir 指定位置
原文地址:http://www.cnblogs.com/xiaohaige/p/7603421.html