Module ...

Define a level

Functions

_M:addEntity (e) Adds an entity to the level Only entities that need to act need to be added.
_M:decay (what, check) Decay the level Decaying means we look on the map for the given type of entities and if we are allowed to we delete them
_M:getEntitiesList (type) Gets an entity list for the level, this allows the Zone to pick objects/actors/...
_M:hasEntity (e) Is the entity on the level?
_M:init (level, map) Initializes the level with a "level" and a map
_M:removeEntity (e) Removes an entity from the level
_M:removed () Removed, so we remove all entities
_M:save () Serialization
_M:setEntitiesList (type, list) Setup an entity list for the level, this allwos the Zone to pick objects/actors/...


Functions

_M:addEntity (e)
Adds an entity to the level Only entities that need to act need to be added. Terrain features do not need this usualy

Parameters

  • e:
_M:decay (what, check)
Decay the level Decaying means we look on the map for the given type of entities and if we are allowed to we delete them

Parameters

  • what: what Map feature to decay (ACTOR, OBJECT, ...)
  • check: either a boolean or a function, if true the given entity will be decayed

Return value:

the number of decayed entities and the total number of such entities remaining
_M:getEntitiesList (type)
Gets an entity list for the level, this allows the Zone to pick objects/actors/...

Parameters

  • type:
_M:hasEntity (e)
Is the entity on the level?

Parameters

  • e:
_M:init (level, map)
Initializes the level with a "level" and a map

Parameters

  • level:
  • map:
_M:removeEntity (e)
Removes an entity from the level

Parameters

  • e:
_M:removed ()
Removed, so we remove all entities
_M:save ()
Serialization
_M:setEntitiesList (type, list)
Setup an entity list for the level, this allwos the Zone to pick objects/actors/...

Parameters

  • type:
  • list:

Valid XHTML 1.0!