Difference between revisions of "SceneManager.new"

(Created page with "'''Available since:''' Gideros 2020.2<br/> '''Class:''' SceneManager<br/> === Description === Creates a new SceneManager object. <source lang="lua"> SceneManager.new(...")
 
(No difference)

Latest revision as of 04:33, 26 March 2020

Available since: Gideros 2020.2
Class: SceneManager

Description

Creates a new SceneManager object.

SceneManager.new(scenes)

Parameters

scenes: (table) the list of scenes

Example

require "scenemanager"
require "easing"

scenemanager = SceneManager.new(
	{
		["menu"] = Menu,
		["level1"] = Level1,
	}
)
stage:addChild(scenemanager)
-- from app start to menu
scenemanager:changeScene("menu")
-- from menu to level1
--scenemanager:changeScene("level1", 1, SceneManager.moveFromRight, easing.outBack)