scene A Switch to the scene B, There are switching effects

The order of calls is as follows :(AAABABABA)

A: Constructors

A:onEnter

A:onEnterTransitionDidFinish

B: Constructors

A:onExitTransitionDidStart

B:onEnter

A:onExit

B:onEnterTransitionDidFinish

A: Destructor

scene A Switch to the scene B, No switch effects

The order of calls is as follows :(AAABAABBA)

A: Constructors

A:onEnter

A:onEnterTransitionDidFinish

B: Constructors

A:onExitTransitionDidStart

A:onExit

B:onEnter

B:onEnterTransitionDidFinish

A: Destructor

scene A in pushScene B scene , There are switching effects (AAABABAB)

The order of calls is as follows :

A: Constructors

A:onEnter

A:onEnterTransitionDidFinish

B: Constructors

A:onExitTransitionDidStart

B:onEnter

A:onExit

B:onEnterTransitionDidFinish

scene A in pushScene B scene , No switch effects (AAABAABB)

The order of calls is as follows :

A: Constructors

A:onEnter

A:onEnterTransitionDidFinish

B: Constructors

A:onExitTransitionDidStart

A:onExit

B:onEnter

B:onEnterTransitionDidFinish

scene B in popScene

The order of calls is as follows :

B:onExitTransitionDidStart

B:onExit

A:onEnter

A:onEnterTransitionDidFinish

cocos2dx-- Two scenarios switch the order of each function call more related articles

  1. Cocos2d-x 3.0 Scene: the switch

    Scene switching should use the director class Director, There are generally two ways , Most of them are replacement scenes (replaceScene), It can also be used to stack (pushScene) Out of the stack (popScene) To replace the scene in a different way . Scene switching code : ...

  2. cocos2d-x 3.0 Scene switching effects summary ( turn )

    cocos2d-x 3.0 There are many special effects in scene switching , And these special effects are often used in game development , To make the scene switch less dry , So here's a summary , Used in development . Scene switching uses the director class Directory, Most of them are for ...

  3. cocos2d-x 3.0 Scene switching effects summary

    cocos2d-x 3.0 There are many special effects in scene switching , And these special effects are often used in game development . To make the scene switch less dry , So here's a summary , Used in development . Scene switching uses the director class Directory, Most of them are for ...

  4. cocos2d-x 2.x In the version , The scene switches the calling order of each method

    Assuming that the A The scene switches to B scene , The order of calling each scenario method is : If there is no switching effect (transition), The first call B Of init(), Call again A Of onExitTransitionStart(), Then call A Of onExi ...

  5. 【Cocos2dx】 New scene 、 Scene switching 、 Set the new scene and menu

    This is a Cocos2dx The simplest part . It mainly reflects the operation of the scene , In fact, this thing is Flash The stage of , Android Activity,WIN32 Form program Framework forms , Web page body, Anyway, it's about holding all kinds of things ...

  6. Learning Cocos2d-x for WP8(6)—— Scene switching and scene transition effects

    original text :Learning Cocos2d-x for WP8(6)-- Scene switching and scene transition effects C#(wp7) Brothers Learning Cocos2d-x for XNA(6)—— Scene switching and scene transition effects ...

  7. 【Cocos2d-x 3.x】 Scene switching lifecycle 、 Background music playing and scene switching principle and source code analysis

    Most games have a lot of scenes , You need to switch between scenes , Sometimes the background music will play and stop when switching , Therefore, the content of this article is summarized . Scene switching lifecycle Functions used for scene switching : bool Setting::init() { ...

  8. [Cocos2d-x For WP8]Transition Scene: the switch

    In the game, you usually switch from the current scene to another one after one level , stay Cocos2d-x It's from CCScene Class represents a scene . So the scene (CCScene) It's for the elves in the game (CCSprite) Provides a stage , site ...

  9. Cocos2d-x Multi scene switching lifecycle

    When multiple scenes switch , The life cycle of the scene will be more complex . In this section, we introduce the scenario switching lifecycle . When multiple scenes are switched, there are several situations : situation 1, Use pushScene Function from implementation HelloWorld Scene entry Setting site ...

Random recommendation

  1. take meteor Easy way to deploy on your own server

    Yes meteor-up And so on , If you don't like them , Try the following , Free control . 1, Create and package projects meteor create newapp meteor build . 2, Upload take bunder.t ...

  2. apache common Under bag StringUtils Of join Method

    apache common Under bag StringUtils Of join Method : keyword :java string array join public static String join(Iterator it ...

  3. Hibernate Monitor

    Hibernate The event monitoring mechanism of Hibernate The event monitoring mechanism in can be used to Session Object's actions , Once something special happens ,Hibernate The event handling method in the listener is executed In the design of some functions , ...

  4. VS Quick location of files 、 Code plug-ins ——DPack

    I used to use Myeclipse To develop a Java project , Find out about it “Open Resource”(Ctrl+Shirft+R) It's easy to use , go back to .Net Then I looked for VS Corresponding functions , After a few tries, I feel Dpack Work well ...

  5. String Class, a few simple common methods

    Here we put info This string adopt “ ” This separator Split into parts No part of it is added to s In an array Be careful : Only strings can be split The separator must be char type And it's character string What's in it , For example, I ...

  6. javascript And DOM operation

    One .document.getElementById()     according to Id Get element node <div id="div1"> <p id="p1"> ...

  7. JavaBean First time to know

    JavaBean It's a special kind java class , It's a pass Java Reusable components implemented by code . To put it simply, it means , Package some reusable code , To reduce code repeatability , Make the development more concise and efficient , Also easy to manage and modify . Ja ...

  8. What I summed up C# Coding standards --5. How to write notes well

    This article is after reading several books mentioned in the foreword , Combined with their own ideas summed up how to write notes some of the more practical methods . In addition, this article is the last one Notes A supplement to How to write notes well Avoid using ambiguous pronouns In some cases ,"it&qu ...

  9. docker completely fill linux The solution to disk root

    One . Disk root is full [test@localhost docker]$ df -lh Filesystem Size Used Avail Use% Mounted on /dev/mapper/ce ...

  10. Spark mllib The practical application of multi-layer classification perceptron in emotion analysis

    import org.apache.spark.ml.Pipeline import org.apache.spark.ml.classification.MultilayerPerceptronCl ...