Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, tutorials, and more.

Making original transitions for replacing scenes

You know that Cocos2d-x has a lot of transitioning effects. However, if it does not have an effect that you need, it is difficult to create an original transitioning effect. However, you can create it if you have the basic knowledge of transitioning effects. In this recipe, we will show you how to create original transitions.

How to do it...

Even though Cocos2d-x has a lot of different types of Transition classes, you may not find a transition effect that you need. In this recipe, you can create an original transition effect such as opening a door. When the replacement of a scene begins, the previous scene is divided into two and open to the left or right.

You have to create new files named "TransactionDoor.h ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, interactive tutorials, and more.