I'm making a game where I will have a card that will flip over (over the y axis). So there will be 2 images: 1 for the front and 1 for the back. What I want to do is change the front image to the back image halfway through the flip. How would I go about doing that? I've read quite a bit of stuff on this site but a lot of them are really vague answers. If someone knows exactly how to do this it would be great.
Card flip animation
(4 posts) (3 voices)-
Posted 6 months ago #
-
You might want to check/use the implementation of CCPageTurn3D.
Posted 6 months ago # -
For a simple effect create a Card class that derives from CCNode, add a front and back sprite and set the front sprite to not be visible. Then run an action of the Card that animates scaleX down to zero, at the middle point set the front to be visible and the back to be hidden, continue the animation of scaleX back up to full width.
The following post may be useful
Posted 6 months ago # -
I figured it out thanks for the help though.
Posted 6 months ago #
Reply
You must log in to post.