Cocos2d-x provides a lot of switching between scenarios, you can use it easily. 1. usage: If a normal scenario without transition has not been established (that is, the first scenario in the game), pDirector-> runWithScene (pScene) is used, for the replacement scenario, use CCDirector: sharedDirector ()-> replaceScene (this); to replace the corresponding scenario, and use the switching effect between scenarios to switch between scenarios, you need to use the corresponding switching method: transitionWithDuration (of course, the use of different effects is slightly different) to generate the corresponding scenario, and then use CCDirector: shareddire()-> replaceScene (this) to start the dynamic scenario, that is to say, this scenario is not directly displayed, but enters the scenario after the effect of the scenario is used up, to achieve the effect of transition. Generally, this function has two parameters. The first parameter is the special effect switching time. You can directly generate a CCTime. the time set in this example is 1.2 s, which is very comfortable for the display in many scenarios, the second is the scenario to be entered. Some may have a third parameter, which will be described below. 2. result summary in test: CCTransitionJumpZoom: transitionWithDuration (t, s); // Skip. This scenario will be reduced first, and then jump in CCTransitionFade: transitionWithDuration (t, s ); // fade out and fade out in the original scenario. fade in the new scenario CCTransitionFade: transitionWithDuration (t, s, ccWHITE); // if the previous function contains three parameters, the third parameter is the fade-out color CCTransitionFlipX: transitionWithDuration (t, s, timeout); // the X axis is left-Flipped CCTransitionFlipX: transitionWithDuration (t, s, kOrientationRightOver ); // right-turning of the X axis CCTransitionFlipY: transitionWithDuration (t, s, kOrientationUpOver); // turning CCTransitionFlipY: transitionWithDuration (t, s, kOrientationDownOver ); // turn CCTransitionFlipAngular: transitionWithDuration (t, s, direction) under the Y axis; // turn CCTransitionFlipAngular: transitionWithDuration (t, s, kOrientationRightOver) from the left ); // right-turn orientation with an angle: transitionWithDuration (t, s, kOrientationLeftOver); // returns the value of transitionWithDuration (t, s, kOrientationRightOver) on the X axis with a zoom effect ); // returns the X axis of the scaling effect to the right: transitionWithDuration (t, s, kOrientationUpOver); // returns the value of transitionWithDuration (t, s, kOrientationDownOver) on the Y axis of the scaling effect ); // turn CCTransitionZoomFlipAngular: transitionWithDuration (t, s, kOrientationLeftOver) under the Y axis with zoom effect; // turn left with zoom effect/rotate with angle: transitionWithDuration (t, s, kOrientationRightOver); // The right flip direction with zoom effect: transitionWithDuration (t, s); // The CCTransitionRotoZoom: transitionWithDuration (t, s ); // rotation: transitionWithDuration (t, s); // the new scene is moved from left to overwrite CCTransitionMoveInR: transitionWithDuration (t, s); // the new scene is moved from right to overwrite CCTransitionMoveInT:: transitionWithDuration (t, s); // new scenario move from top to cover scenario: transitionWithDuration (t, s); // new scenario move from bottom to cover CCTransitionSlideInL: transitionWithDuration (t, s); // The scenario moves from left to the original scenario CCTransitionSlideInR: transitionWithDuration (t, s); // The scenario moves from right to the original scenario CCTransitionSlideInT: transitionWithDuration (t, s); // The original scenario CCTransitionSlideInB: transitionWithDuration (t, s) is introduced from the previous scenario ); // The scenario is migrated from the following to the original scenario. In the following three scenarios, check whether the opengl version supports CCConfiguration: sharedConfiguration ()-> getGlesVersion () <= GLES_VER_1_0. If it is true, CCTransitionCrossFade is not supported:: transitionWithDuration (t, s); // fades out the fade-In crossover and performs the following operations simultaneously: transitionWithDuration (t, s); // clockwise switch-In CCTransitionRadialCW: transitionWithDuration (t, s ); // you need to set the camera to the following two values in a counter-clockwise manner, using CCDirector: shareddire()-> setDepthTest (true); CCTransitionPageTurn: transitionWithDuration (t, s, false ); // page flip, front flip CCTransitionPageTurn: transitionWithDuration (t, s, true); // page flip, then flip CCTransitionFadeTR: transitionWithDuration (t, s ); // wave CCTransitionFadeBL: transitionWithDuration (t, s) to the right; // wave CCTransitionFadeUp: transitionWithDuration (t, s) to the left; // raise the shutter CCTransitionFadeDown :: transitionWithDuration (t, s); // downward blind CCTransitionTurnOffTiles: transitionWithDuration (t, s); // random small square CCTransitionSplitRows: transitionWithDuration (t, s ); // cut by row CCTransitionSplitCols: transitionWithDuration (t, s); // cut by Column