Cocos2d-x 3.0 scenario switching effect summary), cocos2d-x3.0

Source: Internet
Author: User

Cocos2d-x 3.0 scenario switching effect Summary (turn), cocos2d-x3.0

Cocos2d-x 3.0 in the scene switching effect is more, and the game development also often need to use these effects, to make the scene switching is not so dry, then here To summarize, used in development.

Scenario switching uses the director-class Directory. Most of the scenarios are replaced. Of course, you can also use the out-stack and In-stack method to replace the scenario. Here we use replaceScene as an example.

Application code for scenario switching special effects:

Auto scene = HelloWorld: createScene (); // create the scenario to be switched: auto transition = TransitionZoomFlipY: create (1.0f, scene); // wrap the animation effect Director for the scenario :: getInstance ()-> replaceScene (transition); // use the director class to switch the scenario

The following lists the animation effects of scenario switching. You can refer to the code above to apply various special effects. Using appropriate special effects in your own game can play a very good effect.

// Gradually fade to another scenario: TransitionCrossFade: create (time, target scenario); // after this scenario fades out, TransitionFade: create (time, target scenario); // This scenario disappears from the upper right corner to the lower left corner to another scenario TransitionFadeBL: create (time, target scenario ); // This scenario disappears from top to bottom to another scenario TransitionFadeDown: create (time, target scenario); // the lower left corner of this scenario disappears to the upper right corner of the box to another scenario TransitionFadeTR :: create (time, target scenario); // This scenario disappears from bottom to top to TransitionFadeUp: create (time, target scenario ); // In this scenario, the flip disappears to another scenario (oblique top) TransitionFlipAngular: create (time, target scenario, style); // In this scenario, the flip disappears to another scenario (X axis) TransitionFlipX: create (time, target scenario, style); // This scenario is flipped to another scenario (Y axis) TransitionFlipY: create (time, target scenario ); // TransitionJumpZoom: create (time, target scenario) occurs in another scenario. // TransitionMoveInB: create (time, target scenario); // in another scenario, TransitionMoveInL: create (time, target scenario) appears on the left; // in another scenario, TransitionMoveInT appears on the top :: create (time, target scenario); // in another scenario, TransitionMoveInR: create (time, target scenario) appears on the right; // page flip switch, if bool is true, it is a forward flip. TransitionPageTurn: create (time, target scenario, bool); // This scenario disappears from left to right, And TransitionProgressHorizontal: create (time, target scenario) appears in another scenario ); // This scenario disappears from the center to the four sides, while TransitionProgressInOut: create (time, target scenario) occurs in another scenario. // This scenario disappears from the four sides to the middle, while TransitionProgressOutIn occurs in another scenario :: create (time, target scenario); // This scenario disappears counterclockwise to another scenario TransitionProgressRadialCCW: create (time, target scenario ); // This scenario disappears clockwise to another scenario TransitionProgressRadialCW: create (time, target scenario); // This scenario disappears from top to bottom while TransitionProgressVertical occurs in another scenario :: create (time, target scenario); // TransitionRotoZoom: create (time, target scenario) occurs when rotation in another scenario disappears ); // In this scenario, zoom in and switch to another scenario. Zoom in TransitionShrinkGrow: create (time, target scenario). // in this scenario, move up to another scenario. TransitionSlideInB: create (time, target scenario); // This scenario slides right to another scenario TransitionSlideInL: create (time, target scenario); // This scenario slides left to another scenario TransitionSlideInR :: create (time, target scenario); // This scenario slides down to another scenario TransitionSlideInT: create (time, target scenario ); // after the three rectangles disappear in this scenario, TransitionSplitCols: create (time, target scenario) appears in the upper and lower rectangles of the other scenario ); // after the three rectangles disappear in this scenario, TransitionSplitRows: create (time, target scenario) appears on the left and right of the third rectangle in another scenario; // the small box disappears to another scenario TransitionTurnOffTiles :: create (time, target scenario); // This scenario is flipped to another scenario (oblique top) TransitionZoomFlipAngular: create (time, target scenario, style ); // In this scenario, the flip disappears to another scenario (X axis) TransitionZoomFlipX: create (time, target scenario, style); // In this scenario, the flip disappears to another scenario (Y axis) transitionZoomFlipY: create (time, target scenario, style );

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.