Class cc.TransitionScene
- Defined in: CCTransition.js
- Extends cc.Scene
Constructor Attributes | Constructor Name and Description |
---|---|
cc.TransitionScene(t, scene)
|
Method Summary
Class Detail
var trans = new TransitionScene(time,scene);
- Parameters:
- {Number} t
- time in seconds
- {cc.Scene} scene
- the scene to transit with
Method Detail
-
cleanup()custom cleanup
-
creates a base transition with duration and incoming scene
- Parameters:
- {Number} t
- time in seconds
- {cc.Scene} scene
- the scene to transit with
- Deprecated:
- since v3.0, please use new cc.TransitionScene(t,scene) instead
- Returns:
- {cc.TransitionScene|Null}
-
ctor(t, scene)creates a base transition with duration and incoming scene Constructor of cc.TransitionScene
- Parameters:
- {Number} t
- time in seconds
- {cc.Scene} scene
- the scene to transit with
-
finish()called after the transition finishes
-
hideOutShowIn()set hide the out scene and show in scene
-
{Boolean} initWithDuration(t, scene)initializes a transition with duration and incoming scene
- Parameters:
- {Number} t
- time in seconds
- {cc.Scene} scene
- a scene to transit to
- Returns:
- {Boolean} return false if error
-
onEnter()
Event callback that is invoked every time when cc.TransitionScene enters the 'stage'.
If the TransitionScene enters the 'stage' with a transition, this event is called when the transition starts.
During onEnter you can't access a "sister/brother" node.
If you override onEnter, you must call its parent's onEnter function with this._super(). -
onExit()
callback that is called every time the cc.TransitionScene leaves the 'stage'.
If the cc.TransitionScene leaves the 'stage' with a transition, this callback is called when the transition finishes.
During onExit you can't access a sibling node.
If you override onExit, you shall call its parent's onExit with this._super(). -
visit()stuff gets drawn here