Lua API  0.4.0
Game Engine
 All Files Functions
Level.lua File Reference

Functions

 loadLevel (filename)
 Loads a specific level file. More...
 
 getScene (name)
 Retrieves the scene with the given name. More...
 
 changeScene (scene)
 Changes the current scene to the given scene. More...
 
 getCurrentSceneId ()
 Retrieves the ID of the current scene. More...
 
 getScenesNumber ()
 Returns the number of scenes in the current level. More...
 

Function Documentation

changeScene ( scene  )

Changes the current scene to the given scene.

See also: getScene

Parameters
sceneThe new scene.
getCurrentSceneId ( )

Retrieves the ID of the current scene.

Returns
A number.
getScene ( name  )

Retrieves the scene with the given name.

Parameters
nameThe name of the scene.
Returns
The scene.
getScenesNumber ( )

Returns the number of scenes in the current level.

Returns
A number.
loadLevel ( filename  )

Loads a specific level file.

Parameters
filenameThe level to load. Example: loadLevel("levels/menu.level")