简体   繁体   中英

Spin CCSprite Cocos2D?

I am trying to spin a CCSprite in Cocos2D but it is hard to explain in words so here is a GIF of the animation I am trying to achieve: http://max.wilsonsd.org:8080/Clip_Art/Pmpa3/symbols/miscellaneous/peace_sign_spinning_hw.gif

Anyway it is a 360 degree spin but not in a clockwise or counter-clockwise way. Anyway how would I achieve this in Cocos2D?

Thanks!

That effect is called flip, try with the CCFlipX/CCFlipX3D actions. For example

[sprite runAction:[CCRepeatForever actionWithAction:[CCFlipX3D actionWithDuration:1.0]]]

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM