cocos.scenes.transitions module¶
Transitions between Scenes
-
class
CornerMoveTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneMoves the bottom-right corner of the incoming scene to the top-left corner
-
start()¶ Adds the incoming scene with z=1 and the outgoing scene with z=0
-
-
class
EnvelopeTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionScene- From the outgoing scene:
moves the top-right corner to the center
moves the bottom-left corner to the center
- From the incoming scene:
performs the reverse action of the outgoing scene
-
class
FadeBLTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.FadeTRTransitionFade the tiles of the outgoing scene from the top-right corner to the bottom-left corner.
-
get_action(x, y)¶
-
-
class
FadeDownTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.FadeTRTransitionFade the tiles of the outgoing scene from the top to the bottom.
-
get_action(x, y)¶
-
-
class
FadeTRTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneFade the tiles of the outgoing scene from the left-bottom corner the to top-right corner.
-
get_action(x, y)¶
-
start()¶ Adds the incoming scene with z=1 and the outgoing scene with z=0
-
-
class
FadeTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneFade out the outgoing scene and then fade in the incoming scene.
Optionally supply the color to fade to in-between as an RGB color tuple.
-
on_enter()¶ Called every time the Scene enters the stage.
-
on_exit()¶ Called every time the
Sceneexits the stage.
-
-
class
FadeUpTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.FadeTRTransitionFade the tiles of the outgoing scene from the bottom to the top.
-
get_action(x, y)¶
-
-
class
FlipAngular3DTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneFlips the screen half horizontally and half vertically. The front face is the outgoing scene and the back face is the incoming scene.
-
class
FlipX3DTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneFlips the screen horizontally. The front face is the outgoing scene and the back face is the incoming scene.
-
class
FlipY3DTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneFlips the screen vertically. The front face is the outgoing scene and the back face is the incoming scene.
-
class
JumpZoomTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneZoom out and jump the outgoing scene, and then jump and zoom in the incoming
-
class
MoveInBTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.MoveInLTransitionMove in from to the bottom the incoming scene.
-
get_action()¶
-
init()¶
-
-
class
MoveInLTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneMove in from to the left the incoming scene.
-
get_action()¶
-
init()¶
-
-
class
MoveInRTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.MoveInLTransitionMove in from to the right the incoming scene.
-
get_action()¶
-
init()¶
-
-
class
MoveInTTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.MoveInLTransitionMove in from to the top the incoming scene.
-
get_action()¶
-
init()¶
-
-
class
RotoZoomTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneRotate and zoom out the outgoing scene, and then rotate and zoom in the incoming
-
class
ShrinkGrowTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneShrink the outgoing scene while grow the incoming scene
-
class
ShuffleTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneShuffle the outgoing scene, and then reorder the tiles with the incoming scene.
-
class
SlideInBTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.SlideInLTransitionSlide in the incoming scene from the bottom border.
-
get_action()¶
-
init()¶
-
-
class
SlideInLTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneSlide in the incoming scene from the left border.
-
get_action()¶
-
init()¶
-
-
class
SlideInRTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.SlideInLTransitionSlide in the incoming scene from the right border.
-
get_action()¶
-
init()¶
-
-
class
SlideInTTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.SlideInLTransitionSlide in the incoming scene from the top border.
-
get_action()¶
-
init()¶
-
-
class
SplitColsTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneSplits the screen in columns. The odd columns goes upwards while the even columns goes downwards.
-
get_action()¶
-
-
class
SplitRowsTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.SplitColsTransitionSplits the screen in rows. The odd rows goes to the left while the even rows goes to the right.
-
get_action()¶
-
-
class
TransitionScene(dst, duration=1.25, src=None)¶ Bases:
cocos.scene.SceneA Scene that takes two scenes and makes a transition between them.
The input scenes are put into envelopes (Scenes) that are made childs to the transition scene. Proper transitions are allowed to modify any parameter for the envelopes, but must not modify directly the input scenes; that would corrupt the input scenes in the general case.
-
finish()¶ Called when the time is over. Envelopes are discarded and the dst scene will be the one runned by director.
-
hide_all()¶ Hides both the incoming and outgoing scenes
-
hide_out_show_in()¶ Hides the outgoing scene and shows the incoming scene
-
start()¶ Adds the incoming scene with z=1 and the outgoing scene with z=0
-
visit()¶ This function visits its children in a recursive way.
It will first visit the children that that have a z-order value less than 0.
Then it will call the
draw()method to draw itself.And finally it will visit the rest of the children (the ones with a z-value bigger or equal than 0)
Before visiting any children it will call the
transform()method to apply any possible transformations.
-
duration¶ duration in seconds of the transition
-
in_scene¶ envelope with scene that will replace the old one
-
out_scene¶ envelope with scene that will be replaced
-
-
class
TurnOffTilesTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneTurn off the tiles of the outgoing scene in random order
-
start()¶ Adds the incoming scene with z=1 and the outgoing scene with z=0
-
-
class
ZoomTransition(*args, **kwargs)¶ Bases:
cocos.scenes.transitions.TransitionSceneZoom and FadeOut the outgoing scene.
-
finish()¶ Called when the time is over. Envelopes are discarded and the dst scene will be the one runned by director.
-
start()¶ Adds the incoming scene with z=1 and the outgoing scene with z=0
-