File hp/manager/SceneManager.lua

Functions

M:closeScene (params) Close the current scene.
M:findSceneByName (sceneName) Returns the scene to find the scene name.
M:forceUpdateRender () Update the drawing order of layers.
M:getCurrentScene () Returns the current scene.
M:openNextScene (sceneName, params, The) Open to the next scene.
M:openScene (sceneName, params) Open a new scene.
M:orderToBack (scene) Move to the back scene.
M:orderToFront (scene) Move to the front scene.
M:setSceneFactory (factory) Sets the SceneFactory.
M:updateRender () Update the drawing order of layers.

Tables

SceneManager This is a class to manage the Scene.


Functions

M:closeScene (params)
Close the current scene.
To resume the previous scene.

Parameters

  • params: (option)Parameters that define the behavior.
M:findSceneByName (sceneName)
Returns the scene to find the scene name.

Parameters

  • sceneName: Name of the target scene.

Return value:

If a match is found the scene.
M:forceUpdateRender ()
Update the drawing order of layers.
Normally, you need to manipulate this function is not available.
M:getCurrentScene ()
Returns the current scene.

Return value:

currentScene.
M:openNextScene (sceneName, params, The)
Open to the next scene.
The current scene will be closed.
See M:openScene().

Parameters

  • sceneName:
  • params: (option)Parameters that define the behavior.
  • The: unique name of the scene. Scene module path.

Return value:

If you generate a return to the scene.
M:openScene (sceneName, params)
Open a new scene.
The current scene is the stack intact.
But if set to true currentClosing, close the current scene.

You can specify the behavior in the argument params.
1. params.sceneClass
Specifies the class of scenes to be generated.
2. params.animation
Specifies the animation of the scene transitions.
3. params.sec
Specifies the time of the animation.
4. params.currentClosing
Specify whether to close the current scene.

Parameters

  • sceneName: The unique name of the scene. Scene module path.
  • params: (option)Parameters that define the behavior.

Return value:

If you generate a return to the scene.
M:orderToBack (scene)
Move to the back scene.

Parameters

  • scene: Scene or scene name.
M:orderToFront (scene)
Move to the front scene.

Parameters

  • scene: Scene or scene name.
M:setSceneFactory (factory)
Sets the SceneFactory.
If you need to use your own factory.

Parameters

  • factory: Scene factory module.
M:updateRender ()
Update the drawing order of layers.
Normally, you need to manipulate this function is not available.
Timing to be updated, in fact, is done in EnterFrame.

Tables

SceneManager
This is a class to manage the Scene.
Order to manage the rendering of the scene and event notification.

Valid XHTML 1.0!