I'm new to Cocos2d-x and looking for a good way/tutorial on how to play animations in Cocos2d-x.
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
Sprite animation is pretty simple. You just create a CCAnimation node, add the images to loop, then create an action using CCAnimate::actionWithDuration(float,CCAnimation,bool) and make the sprite run it. Code snippet:
|
|||||||||||
|
|
In new version of CoCos2dx you can use (it's working)
|
||||
|
|
If you don't want to use a .plist file and want to continue with the Ef Es's answer with the current version of cocos2d-x, just change some lines as below:
I think this can be the solution for Ben's question also. |
|||
|
|
