版本 cocos2dx 2.2.5
--淡入淡出 local function FadeInOut(sec) local fadein = CCFadeIn:create(sec) local fadeout = CCFadeOut:create(sec) local sequence = CCSequence:createWithTwoActions(fadein,fadeout) return sequence end调用
fadeinout = FadeInOut(2) bg:runAction(CCRepeatForever:create(fadeinout))
bg是CCSprite对象
--旋转并放大 rot = CCRotateBy:create(1,360) scale = CCScaleTo:create(1.0,2.0) seq = CCSequence:createWithTwoActions(rot,scale) zhuque:runAction(seq)
边旋转边放大
rot = CCRotateBy:create(1,2.0) ary = CCArray:create() ary:addObject(rot) ary:addObject(scale) --seq = CCSequence:createWithTwoActions(rot,scale) --jump = CCJumpBy:create(3,ccp(0,0),100,4) --skewTo = CCSkewTo:create(2,40,0) --skewTo2 = CCSkewTo:create(2,40) spawn = CCSpawn:create(ary) --move = CCMoveTo:create(0.5,ccp(300,hpos)) zhuque:runAction(spawn)原文链接:https://www.f2er.com/cocos2dx/347122.html