Difference between revisions of "SceneManager"
Line 45: | Line 45: | ||
[[Special:MyLanguage/SceneManager_exitEnd|exitEnd]]<br/><!-- GIDEROSEVT:exitEnd--> | [[Special:MyLanguage/SceneManager_exitEnd|exitEnd]]<br/><!-- GIDEROSEVT:exitEnd--> | ||
=== <translate>Constants</translate> === | === <translate>Constants</translate> === | ||
− | + | SceneManager.moveFromRight<br/><!-- GIDEROSCST:SceneManager.moveFromRight--> | |
− | + | SceneManager.moveFromLeft<br/><!-- GIDEROSCST:SceneManager.moveFromLeft--> | |
− | + | SceneManager.moveFromBottom<br/><!-- GIDEROSCST:SceneManager.moveFromBottom--> | |
− | + | SceneManager.moveFromTop<br/><!-- GIDEROSCST:SceneManager.moveFromTop--> | |
− | + | SceneManager.moveFromRightWithFade<br/><!-- GIDEROSCST:SceneManager.moveFromRightWithFade--> | |
− | + | SceneManager.moveFromLeftWithFade<br/><!-- GIDEROSCST:SceneManager.moveFromLeftWithFade--> | |
− | + | SceneManager.moveFromBottomWithFade<br/><!-- GIDEROSCST:SceneManager.moveFromBottomWithFade--> | |
− | + | SceneManager.moveFromTopWithFade<br/><!-- GIDEROSCST:SceneManager.moveFromTopWithFade--> | |
− | + | SceneManager.overFromRight<br/><!-- GIDEROSCST:SceneManager.overFromRight--> | |
− | + | SceneManager.overFromLeft<br/><!-- GIDEROSCST:SceneManager.overFromLeft--> | |
− | + | SceneManager.overFromBottom<br/><!-- GIDEROSCST:SceneManager.overFromBottom--> | |
− | + | SceneManager.overFromTop<br/><!-- GIDEROSCST:SceneManager.overFromTop--> | |
− | + | SceneManager.overFromRightWithFade<br/><!-- GIDEROSCST:SceneManager.overFromRightWithFade--> | |
− | + | SceneManager.overFromLeftWithFade<br/><!-- GIDEROSCST:SceneManager.overFromLeftWithFade--> | |
− | + | SceneManager.overFromBottomWithFade<br/><!-- GIDEROSCST:SceneManager.overFromBottomWithFade--> | |
− | + | SceneManager.overFromTopWithFade<br/><!-- GIDEROSCST:SceneManager.overFromTopWithFade--> | |
− | + | SceneManager.fade<br/><!-- GIDEROSCST:SceneManager.fade--> | |
− | + | SceneManager.crossFade<br/><!-- GIDEROSCST:SceneManager.crossFade--> | |
− | + | SceneManager.flip<br/><!-- GIDEROSCST:SceneManager.flip--> | |
− | + | SceneManager.flipWithFade<br/><!-- GIDEROSCST:SceneManager.flipWithFade--> | |
− | + | SceneManager.flipWithShade<br/><!-- GIDEROSCST:SceneManager.flipWithShade--> | |
|} | |} | ||
{{GIDEROS IMPORTANT LINKS}} | {{GIDEROS IMPORTANT LINKS}} |
Revision as of 04:14, 26 March 2020
Supported platforms:
Available since: 2020.2
Inherits from: Sprite
Description
An easy way to manage scenes.
Note: works in pair with the Easing plugin
require "scenemanager"
Example
How to declare and change scenes
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)
MethodsSceneManager.new creates a new SceneManager object SceneManager:changeScene transitions to a scene |
EventsenterBegin ConstantsSceneManager.moveFromRight |