Cocos2d scene switching animation effect

Source: Internet
Author: User

// Fade in and out

Cctransitionfade * trans = [cctransitionfade transitionwithduration: 1.0 scene: [mywrld scene] withcolor: ccred];

// The original scenario jumps to a smaller value, while the new scenario jumps to a larger value.

Cctransitionjumpzoom * trans = [cctransitionjumpzoom transitionwithduration: 1.5 scene: [mywrld scene];

// The tile starts to reveal the scene from the bottom left.

Cctransitionfadetr * trans = [cctransitionfadetr transitionwithduration: 1.5 scene: [mywrld scene];

// The tile starts to reveal the scene from the top right.

Cctransitionfadebl * trans = [cctransitionfadebl transitionwithduration: 1.5 scene: [mywrld scene];

// Display the scenario from top to bottom on the tile

Cctransitionfadedown * trans = [cctransitionfadedown transitionwithduration: 1.5 scene: [mywrld scene];

// Reveal the scene of the tile from the bottom up

Cctransitionfadeup * trans = [cctransitionfadeup transitionwithduration: 1.5 scene: [mywrld scene];

// Remove the scene, and move the new scene from the left, right, top or bottom.

Cctransitionmoveinb * trans = [cctransitionmoveinb transitionwithduration: 1.5 scene: [mywrld scene];

// Page flip

Cctransitionpageturn * trans = [cctransitionpageturn transitionwithduration: 1.5 scene: [mywrld scene];

[[Ccdirector shareddire] pushscene: Trans];

  1. Ccfadetransition: fade in to a specified color and then return.

  2. Ccfadetrtransition (there are three other changes): the tile (tiles) is reversed to reveal the scene.

  3. Ccjumpzoomtransition.

  4. Ccmoveinltransition (there are three other changes): the scene is removed, and the new scene is removed from the left, right, and top

    Or lower.

  5. Ccorientedtransitionscene (there are six other changes): This transition will flip the entire scenario.

  6. Ccpageturntransition: the effect of the book page.

  7. Ccrotozoomtransition: The current scene turns smaller, and the new scene turns bigger.

  8. Ccshrinkgrowtransition: the current scenario is reduced, and the new scenario becomes larger.

    9.
    Ccslideinltransition (there are three other changes): the new scenario slides in from the left, right, top or bottom.

    10. ccsplitcolstransition (there is another change): Cut the current scene into vertical bars, move up and down to reveal new scenes.

    11. ccturnofftilestransition: divide the current scenario into blocks and randomly Replace the blocks in the current scenario with the new scenario.


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.