ChangeScene

From MaratisWiki
(Difference between revisions)
Jump to: navigation, search
m
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Load a scene from an object scene.
+
{{lua-function|changeScene|scene}}
You have to load a scene to use this function.
+
  
     scene = loadScene("nextScene")
+
Change the scene of the current level.
 +
 
 +
{{lua-function-param|scene|scene to change to}}
 +
 
 +
     scene = getScene("nextScene")
 
     changeScene(scene)
 
     changeScene(scene)
 +
 +
'''Note:''' the loading time depends of the number of physics objects to initialize and the data type of the scene, a scene with 'Dynamic' data mode implies the loading of the textures and sounds of the scene, when a scene with a 'Static' data mode already have its textures and sounds in memory.
 +
 +
[[Category:Lua scripting]]
 +
[[Category:Lua function]]
 +
[[Category:Scene]]

Latest revision as of 00:54, 9 February 2014

changeScene(scene)

Change the scene of the current level.

  • scene : scene to change to
   scene = getScene("nextScene")
   changeScene(scene)

Note: the loading time depends of the number of physics objects to initialize and the data type of the scene, a scene with 'Dynamic' data mode implies the loading of the textures and sounds of the scene, when a scene with a 'Static' data mode already have its textures and sounds in memory.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox