API Document Index



Class me.levelDirector


Defined in: <build/melonJS-0.9.3.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
a level manager object
once ressources loaded, the level director contains all references of defined levels
There is no constructor function for me.levelDirector, this is a static object
Method Summary
Method Attributes Method Name and Description
 
return the current level id
 
loadLevel(level)
load a level into the game manager
(will also create all level defined entities, etc.
 
load the next level
 
load the previous level
 
reload the current level
Class Detail
me.levelDirector()
a level manager object
once ressources loaded, the level director contains all references of defined levels
There is no constructor function for me.levelDirector, this is a static object
Method Detail
{String} getCurrentLevelId()
return the current level id
Returns:
{String}

loadLevel(level)
load a level into the game manager
(will also create all level defined entities, etc..)
// the game defined ressources
// to be preloaded by the loader
// TMX maps
...
{name: "a4_level1",   type: "tmx",   src: "data/level/a4_level1.tmx"},
{name: "a4_level2",   type: "tmx",   src: "data/level/a4_level2.tmx"},
{name: "a4_level3",   type: "tmx",   src: "data/level/a4_level3.tmx"},
...
...
// load a level
me.levelDirector.loadLevel("a4_level1");
Parameters:
{String} level
level id

nextLevel()
load the next level

previousLevel()
load the previous level

reloadLevel()
reload the current level

Documentation generated by JsDoc Toolkit 2.4.0 on Tue May 01 2012 12:00:49 GMT+0800 (CST)