SceneManager class provides and easy way to manage scenes in Gideros. Manage memory between scenes - adding and removing objects.
And even provide different kind of animations for scene transitions
Each scene should be a simple Sprite element, with all the corresponding methods and events.
SceneManager also provides additional events to track transitions between scenes and add specific actions on these events.
--define scenes
sceneManager = SceneManager.new({
--start scene
["start"] = start,
--pack select scene
["pack_select"] = pack_select,
--level select scene
["level_select"] = level_select,
--level itself
["level"] = level
})
--add manager to stage
stage:addChild(sceneManager)