2.左右轻微摇摆
[sprite stopAllActions];
CCRotateTo * rotLeft = [CCRotateBy actionWithDuration:0.1 angle:-4.0];
CCRotateTo * rotCenter = [CCRotateBy actionWithDuration:0.1 angle:0.0];
CCRotateTo * rotRight = [CCRotateBy actionWithDuration:0.1 angle:4.0];
CCSequence * rotSeq = [CCSequence actions:rotLeft, rotCenter, rotRight, rotCenter, nil];
[sprite runAction:[CCRepeatForever actionWithAction:rotSeq]];
停止摇摆
[sprite runAction:[CCRotateTo actionWithDuration:0.1 angle:0]];
3.不停闪烁
CCBlink* blink=[CCBlink actionWithDuration:0.5 blinks:1];
[sprite runAction:[CCRepeatForever actionWithAction:blink]];
10.cocos2d的常用动作及效果总结
http://lizi07.iteye.com/blog/1625985
[sprite stopAllActions];
CCRotateTo * rotLeft = [CCRotateBy actionWithDuration:0.1 angle:-4.0];
CCRotateTo * rotCenter = [CCRotateBy actionWithDuration:0.1 angle:0.0];
CCRotateTo * rotRight = [CCRotateBy actionWithDuration:0.1 angle:4.0];
CCSequence * rotSeq = [CCSequence actions:rotLeft, rotCenter, rotRight, rotCenter, nil];
[sprite runAction:[CCRepeatForever actionWithAction:rotSeq]];
停止摇摆
[sprite runAction:[CCRotateTo actionWithDuration:0.1 angle:0]];
3.不停闪烁
CCBlink* blink=[CCBlink actionWithDuration:0.5 blinks:1];
[sprite runAction:[CCRepeatForever actionWithAction:blink]];
10.cocos2d的常用动作及效果总结
http://lizi07.iteye.com/blog/1625985