Class me.entityPool
Defined in: <build/melonJS-0.9.3.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
a pool of object entity
this object is used by the engine to instanciate object defined in the map which means, that on level loading the engine will try to instanciate every object found in the map, based on the user defined name in each Object Properties ![]() There is no constructor function for me.entityPool, this is a static object |
| Method Attributes | Method Name and Description |
|---|---|
|
add(className, object)
add an object to the pool
|
Class Detail
me.entityPool()
a pool of object entity
this object is used by the engine to instanciate object defined in the map
which means, that on level loading the engine will try to instanciate every object
found in the map, based on the user defined name in each Object Properties

There is no constructor function for me.entityPool, this is a static object
this object is used by the engine to instanciate object defined in the map
which means, that on level loading the engine will try to instanciate every object
found in the map, based on the user defined name in each Object Properties

There is no constructor function for me.entityPool, this is a static object
Method Detail
add(className, object)
add an object to the pool
// add our users defined entities in the entity pool
me.entityPool.add("playerspawnpoint", PlayerEntity);
me.entityPool.add("cherryentity", CherryEntity);
me.entityPool.add("heartentity", HeartEntity);
me.entityPool.add("starentity", StarEntity);
- Parameters:
- {String} className
- as defined in the Name fied of the Object Properties (in Tiled)
- {Object} object
- corresponding Object to be instanciated