CCSprite flipping (different front & back images)

CCSprite flipping (different front & back images)
0.0 0

#1

I have a CCSprite ‘tile’ that I put some text and an icon onto. I want to ‘flip’ this tile around its x/y axis and have a different text and/or icon on the back side. The objective is it to be a button that turns a feature on and off. i.e. Click the tile, it flips around to show you it has been activated.

What would be the best strategy to get this working? Not sure if it would be one sprite or two?

I’m basically after the same effect as the CCTransitionFlipX transition, but applied to a sprite instead of a scene.


#2

You can implement own action and in update method when you detect that rotation is for example 90 degrees you change texture or simply use 2 sprites and show hide :slight_smile: