cocos.scenes.sequences module

class SequenceScene(*scenes)

Bases: cocos.scene.Scene

A Scene used to play a sequence of scenes one after another.

Parameters

*scenes (Scene) – argument list with the scenes to play.

The playing goes from first arg to last arg.

For each scene, scene.on_enter is not called until it becomes active.

Use director.pop to advance to the next scene.

director.pop when the last scene is playing removes that scene and the SequenceScene from the scene stack.

Example use case: running a intro scene before the main menu scene:

director.run(SequenceScene(intro(), menuGame()))
on_enter()

Called every time the Scene enters the stage.