Class Index | File Index

Classes


Class R.resources.loaders.LevelLoader


Extends R.resources.loaders.ObjectLoader.
Loads 2D tilemapped levels for use in games. Levels are comprised of multiple layers which describe backgrounds, playfield (actors and fixtures), and foregrounds. The playfield is where the player and other interactive elements will exist.
Defined in: levelloader.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Fields borrowed from class R.resources.loaders.RemoteLoader:
STATUS_CACHED, STATUS_NOT_FOUND, STATUS_OK, STATUS_SERVER_ERROR
Method Summary
Method Attributes Method Name and Description
 
exportAll(levelNames)
Export all of the levels, as a JavaScript object, with the level name as the key and the corresponding R.resources.types.Level as the value.
 
Get the class name of this object.
 
getLevel(level)
Creates a R.resources.types.Level object representing the named level.
 
The name of the resource this loader will get.
 
load(name, url)
Load a level object from a URL.
Methods borrowed from class R.resources.loaders.ObjectLoader:
afterLoad, constructor
Methods borrowed from class R.resources.loaders.RemoteLoader:
exists, getPathUrl, setPathUrl
Methods borrowed from class R.resources.loaders.AbstractResourceLoader:
clear, destroy, get, getCachedObjects, getResourceObject, getResources, isReady, release, set, setReady, unload
Methods borrowed from class R.engine.BaseObject:
addEvent, addEvents, getElement, jQ, removeEvent, setElement, triggerEvent, update
Methods borrowed from class R.engine.PooledObject:
clearObjectDataModel, getId, getName, getObjectDataModel, getProperties, isDestroyed, setName, setObjectDataModel, toString, toXML
Class Detail
R.resources.loaders.LevelLoader(name)
Parameters:
name
{String=LevelLoader} The name of the resource loader
Method Detail
exportAll(levelNames)
Export all of the levels, as a JavaScript object, with the level name as the key and the corresponding R.resources.types.Level as the value.
Parameters:
levelNames Optional
{Array} An optional array of levels to export, by name, or null to export all levels

{String} getClassName()
Get the class name of this object.
Returns:
{String} The string "R.resources.loaders.LevelLoader"

{R.resources.types.Level} getLevel(level)
Creates a R.resources.types.Level object representing the named level.
Parameters:
level
{String} A loaded level name
Returns:
{R.resources.types.Level} A R.resources.types.Level object

{String} getResourceType()
The name of the resource this loader will get.
Returns:
{String} The string "level"

load(name, url)
Load a level object from a URL.
Parameters:
name
{String} The name of the level
url
{String} The URL where the resource is located

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:20 GMT-0400 (EDT)