Module flower.SceneMgr
This is a singleton class to manage the scene object.
Extends:
Info:
- Release: V3.0.0
- Author: Makoto
Functions
SceneMgr:initialize () | Initialize. |
SceneMgr:gotoScene (sceneName, params) | Goes to a new scene. |
SceneMgr:openScene (sceneName, params) | Open the Scene. |
SceneMgr:internalOpenScene (sceneName, params, currentCloseFlag) | Open the scene for the internal implementation. |
SceneMgr:closeScene (params) | Close the Scene. |
SceneMgr:createScene (sceneName, params) | Create the Scene. |
SceneMgr:getSceneAnimationByName (name) | Return the scene transition animation with the specified name. |
SceneMgr:getSceneByName (sceneName) | Find a scene by its name. |
SceneMgr:addScene (scene) | Add a scene. |
SceneMgr:removeScene (scene) | Remove a scene. |
SceneMgr:getRenderTable () | Returns the render table. |
SceneMgr:onTouch (e) | The event handler is called when you touch the screen. |
SceneMgr:onEnterFrame (e) | The event handler is called when enter frame. |
Functions
- SceneMgr:initialize ()
- Initialize.
- SceneMgr:gotoScene (sceneName, params)
-
Goes to a new scene.
Will close the current scene.
Parameters:
- sceneName module name of the Scene
- params (option)Parameters of the Scene
- SceneMgr:openScene (sceneName, params)
-
Open the Scene.
Parameters:
- sceneName module name of the Scene
- params (option)Parameters of the Scene
- SceneMgr:internalOpenScene (sceneName, params, currentCloseFlag)
-
Open the scene for the internal implementation.
variable that can be specified in params are as follows.
- animation: Scene animation of transition.
- second: Time to scene animation.
- easeType: EaseType to animation scene.
- sync: Other threads wait until action will finish.
Parameters:
- sceneName
- params
- currentCloseFlag
- SceneMgr:closeScene (params)
-
Close the Scene.
variable that can be specified in params are as follows.
- animation: Scene animation of transition.
- second: Time to scene animation.
- easeType: EaseType to animation scene.
- backScene: The name of the scene you want to back.
- backSceneCount: Number of scene you want to back.
- sync: Other threads wait until action will finish.
Parameters:
- params (option)Parameters of the Scene
- SceneMgr:createScene (sceneName, params)
-
Create the Scene.
NOTE: FOR INTERNAL USE ONLY
Parameters:
- sceneName
- params
- SceneMgr:getSceneAnimationByName (name)
-
Return the scene transition animation with the specified name.
If you do not specify a name, will return to the default animation ('change').
Parameters:
- name Animation name of the SceneAnimations
Returns:
-
animation function
- SceneMgr:getSceneByName (sceneName)
-
Find a scene by its name.
Parameters:
- sceneName name of the Scene.
Returns:
-
Scene object
- SceneMgr:addScene (scene)
-
Add a scene.
Parameters:
- scene scene
Returns:
-
True if this scene didn't already exist in the list.
- SceneMgr:removeScene (scene)
-
Remove a scene.
Parameters:
- scene scene
Returns:
-
a number if the scene was removed; false if it wasn't there in the first place.
- SceneMgr:getRenderTable ()
-
Returns the render table.
Used in RenderMgr.
Returns:
-
Render table
- SceneMgr:onTouch (e)
-
The event handler is called when you touch the screen.
Touch to fire a event to Scene.
Parameters:
- e Touch event
- SceneMgr:onEnterFrame (e)
-
The event handler is called when enter frame.
Fire a event to Scene.
Parameters:
- e Enter frame event