Module necro.game.object.Map

Functions

add (entityID, x, y) Add entityID to the map.
allWithComponent (x, y, component) Returns a list of entities on tile (x, y) having the specified component
entitiesWithComponent (x, y, component) Iterates over entities on tile (x, y) having the specified component
firstWithComponent (x, y, component) Returns the first entity on tile (x, y) with the specified component, or nil if no such entity exists.
get (x, y)
getAll (x, y)
hasComponent (x, y, component) Returns true if any entity on tile (x, y) has the specified component, false otherwise
move (entityID, x1, y1, x2, y2)
remove (entityID, x, y) Remove entityID from the map.
reset ()


Functions

add (entityID, x, y)
Add entityID to the map. If the entity was already present, it is moved to the end.

Parameters:

  • entityID
  • x
  • y
allWithComponent (x, y, component)
Returns a list of entities on tile (x, y) having the specified component

Parameters:

  • x
  • y
  • component
entitiesWithComponent (x, y, component)
Iterates over entities on tile (x, y) having the specified component

Parameters:

  • x
  • y
  • component
firstWithComponent (x, y, component)
Returns the first entity on tile (x, y) with the specified component, or nil if no such entity exists.

Parameters:

  • x
  • y
  • component
get (x, y)

Parameters:

  • x
  • y
getAll (x, y)

Parameters:

  • x
  • y
hasComponent (x, y, component)
Returns true if any entity on tile (x, y) has the specified component, false otherwise

Parameters:

  • x
  • y
  • component
move (entityID, x1, y1, x2, y2)

Parameters:

  • entityID
  • x1
  • y1
  • x2
  • y2
remove (entityID, x, y)
Remove entityID from the map. Does nothing if the entity wasn't there.

Parameters:

  • entityID
  • x
  • y
reset ()
generated by LDoc 1.4.6