Class Index | File Index

Classes


Class VENISON.ENTITY.EntityManager

Singleton used for storing and updating entities.
Defined in: venison_engine.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Get all the entities that are registered with the EntityManager.
 
Get a game entity by its ID.
 
Get a game entity by its name.
 
Get the total number of entities registered with the EntityManager.
 
Register a game entity with the EntityManager.
 
fnRemoveEntity(iEntity)
Register a game entity to be removed from the game during the next frame.
 
Remove an entity from the game immediately, freeing its ID.
Class Detail
VENISON.ENTITY.EntityManager()
Method Detail
{Array} fnGetEntities()
Get all the entities that are registered with the EntityManager.
Returns:
{Array} The array of all the entities currently registered with the EntityManager.

{VENISON.ENTITY.GameEntity} fnGetEntityByID(iID)
Get a game entity by its ID.
Parameters:
{Number} iID
The ID of the entity.
Returns:
{VENISON.ENTITY.GameEntity} The entity with the ID iID.

{VENISON.ENTITY.GameEntity} fnGetEntityByName(iName)
Get a game entity by its name.
Parameters:
{Object} iName
The name of the entity.
Returns:
{VENISON.ENTITY.GameEntity} The entity with the name iName.

{Number} fnGetNumberOfEntities()
Get the total number of entities registered with the EntityManager.
Returns:
{Number} The total number of entities registered with the EntityManager.

fnRegisterEntity(iEntity)
Register a game entity with the EntityManager.
Parameters:
{VENISON.ENTITY.GameEntity} iEntity
The entity to register.

fnRemoveEntity(iEntity)
Register a game entity to be removed from the game during the next frame.
Parameters:
{VENISON.ENTITY.GameEntity} iEntity
The entity to remove.

fnRemoveEntityImmediately(iEntity)
Remove an entity from the game immediately, freeing its ID. NOTE: Don't use from physics callback. Preferably use VENISON.ENTITY.EntityManager#fnRemoveEntity instead.
Parameters:
{VENISON.ENTITY.GameEntity} iEntity
The entity to remove.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu May 05 2011 18:47:28 GMT+0200 (CEST)