CCMoveBy CCMoveTo
CCScaleBy CCScaleTo
CCRotateBy CCRotateTo
CCSkewBy CCSkewTo
CCTintBy CCTintTo
CCJumpBy CCJumpTo
CCHide CCShow
CCFadeIn CCFadeout
CCToggleVisibility
CCCallFunc //回掉函数 CCCallFunc::create(this, callfunc_selector(HellWorld::test))
CCDelayTime //延迟时间
CCSequence //顺序播放动画
CCSpawn //一起播放动画
CCRepeat //重复动画 CCRepeat *repeat = CCRepeat::create(seq, 3) //cocos2d-x写法
使用方法:
CCMoveBy *action1 = [CCMoveBy actionWithDuration:1 position:CGPointMake(30, 30)]; [s runAction:action1];
或者:
CCMoveBy *action1 = [CCMoveBy actionWithDuration:1 position:CGPointMake(30, 30)]; CCMoveTo *action2 = [CCMoveTo actionWithDuration:5 position:CGPointMake(200, 100)]; CCSequence *se = [CCSequence actions:action1,action2, nil]; [s runAction:se];
变速动画!!
CCMoveTo *m = CCMoveTo::create(1.0f, ccp(480,160)); CCEaseBackIn *bm = CCEaseBackIn::create(m); sprite->runAction(bm);