-
Notifications
You must be signed in to change notification settings - Fork 0
LevelManager
nhmkdev edited this page Jan 16, 2014
·
8 revisions
The Level Manager is a basic wrapper around the ImpactJS level loading functionality.
var Levels = ig.global.data.levels;
var LevelManager = ig.global.support.levelmanager;
Levels.sample = // NOTE: 'sample' is an example level id used by the LevelManager
{
n:'sample', // name -- intended for display purposes, not used by code otherwise
s:false, // The default level to load if true (default: false)
//m:'music', //music
//TODO: lots of other settings!
}
A very basic level load: LevelManager.loadDeferred(levelId) This uses the levelid specified in the ig.global.data.levels object.
Also see the LevelManager code file.
Be sure to update both the levelrequires.js and levels.js files (TODO: combine the two?)