director

The director library provides scene manageement, with methods to load, initialize, transition to, and destroy scenes.

Summary
directorThe director library provides scene manageement, with methods to load, initialize, transition to, and destroy scenes.
Functions
director.newSceneCreates an empty scene.
director.loadSceneLoads a scene but doesn’t display it yet.
director.gotoSceneTransitions to a scene.

Functions

director.newScene

Creates an empty scene.  This method should be called from a scene module before other initialization.  See the Scene Template.

Parameters

none

Returns

An empty scene.

director.loadScene

function director.loadScene(file,
param1,
param2)

Loads a scene but doesn’t display it yet.  The createScene method will be called on the scene.  Any textures created in this method call are loaded in a background thread.

Parameters

fileThe name of the file to load.

Returns

The created scene.

See Also

director.gotoScene

director.gotoScene

function director.gotoScene(sceneName,
params)

Transitions to a scene.  The scene is loaded if it has not already been.

Parameters

scenethe name of the scene
paramsan optional table specifying the transition to use and the parameters of that transition

See Also

director.loadScene

function director.loadScene(file,
param1,
param2)
Loads a scene but doesn’t display it yet.
function director.gotoScene(sceneName,
params)
Transitions to a scene.
Close