quick-cocos2d-x3.3 Study (vi)---------jump scenes and transition animations

Source: Internet
Author: User

Jump scene

1 app:enterscene ("gamescene"nil"slideint"  1.0)
2 App:enterscene ("gamescene"1.0)   
3 App:enterscene ("gamescene"1.0)   
4 App:enterscene ("gamescene"1.0)   


enterScene(sceneName, args, transitionType, time, more)

Its parameters are:
    • Scenename: Represents the scene name of the jump scene, which is the scene name of the scene we are going to enter.
    • Args: Represents the parameter that jumps to the scene class constructor, and args needs to be a table.
    • Transitiontype: Represents the Transition animation type for scene switching, with approximately 30 transition animation types defined in Lua.
    • Time: Represents the transition from the current scene to the scenename scene.
    • MORE: Represents the transition effect additional parameters.

So, it app:enterScene("GameScene", nil, "SLIDEINT", 1.0) means switching from the current scene to the gamescene scene,

The transition animation is slideint type (new scene gamescene from the top, while the existing scene mainscene exits from the bottom),

The entire switching process takes 1 seconds.

Transitiontype can be some of the following types: (in quotes "" when added, must be uppercase)

  • Crossfade: Fades out of the current scene while fading into the next scene
  • Fade: Fades the current scene to the specified color, the default color is ccc3 (0, 0, 0), and the last parameter of the wrapscenewithtransition () can be used to specify the color
  • Fadebl: Fade out of scene from lower left corner
  • Fadedown: Fade out of scene from bottom
  • FADETR: Fade out scene from top right corner
  • Fadeup: Fade out of scene from top
  • Flipangular: The current scene is tilted and flipped to the next scene, which is flipped from the left by default and can be specified as:
    • Cc. Transition_orientation_left_over, start from the left.
    • Cc. Transition_orientation_right_over, start from the right.
    • Cc. Transition_orientation_up_over start at the top
    • Cc. Transition_orientation_down_over start at the bottom
  • FLIPX: Flip horizontally, default from left to right, additional parameters available as above
  • FLIPY: Vertical Flip, default from top to bottom, available additional parameters ibid.
  • Zoomflipangular: Zoom in and out at the same time, additional parameters available
  • ZOOMFLIPX: Zoom in and out horizontally, with additional parameters as above
  • ZOOMFLIPY: Zoom in and out vertically, with additional parameters available as above
  • Jumpzoom: Jump Zoom Toggle Scene
  • MOVEINB: New scene enters from bottom, existing scene exits from top at the same time
  • MOVEINL: The new scene enters from the left and the existing scene exits from the right side
  • MOVEINR: The new scene enters from the right and the existing scene exits from the left side
  • Moveint: New scene enters from top, existing scene exits from bottom at the same time
  • Pageturn: Page Turn effect, if the specified additional parameter is true, the page is left to the right
  • Rotozoom: Rotating Zoom Toggle Scene
  • Shrinkgrow: Narrowing cross-switching scenes
  • SLIDEINB: The new scene enters from the bottom, overwriting the existing scene directly
  • SLIDEINL: The new scene enters from the left, overwriting the existing scene directly
  • SLIDEINR: The new scene enters from the right, overwriting the existing scene directly
  • Slideint: The new scene enters from the top, overwriting the existing scene directly
  • Splitcols: Switch into a new scene in multiple columns
  • Splitrows: Switch into a new scene in multiple lines, like a shutter
  • Turnofftiles: The current scene is divided into blocks, and is gradually replaced with a new scene

quick-cocos2d-x3.3 Study (vi)---------jump scenes and transition animations

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.