cocos2d-x-3.0spine

Use Spine in Cocos2dx


In cocos2dx, I use the class skeletonAnimation to create the skeleton animation which uses the resources exported by spine. We know the class skeletonAnimation is the subclass of node not is sprite.
How to do to make the skeleton animation flip the node as it like to use the method setFlippedX() in sprite node.


Solution

  • Use the method Which is inherited from class Node: setScaleX(-1), it works!