Manages a stack of scenes. Only the front-most scene receives game updates.

Constructor

Properties

read only height :Float

The ideal height of the director's scenes. Used by some transitions.

read only occludedScenes :Array<Entity>

The scenes that are partially occluded by a transparent or transitioning scene, from back to front. These scenes are not updated, but they're still drawn.

read only scenes :Array<Entity>

The complete list of scenes managed by this director, from back to front.

read only topScene :Entity

The front-most scene.

read only transitioning :Bool

Whether the director is currently transitioning between scenes.

read only width :Float

The ideal width of the director's scenes. Used by some transitions.

Methods

View source

pushScene (scene :Entity, ?transition :Transition) :Void

View source

setSize (width :Float, height :Float) :Director

Sets the ideal size of the scenes in this director. By default, the size is the full stage width and height. This size is used by some transitions, such as SlideTransition.

View source

unwindToScene (scene :Entity, ?transition :Transition) :Void

Pops the scene stack until the given entity is the top scene, or adds the scene if the stack becomes empty while popping.

Static properties

View source

static read only NAME :String