Class: Entity

Entity

new Entity(name)

Parameters:
Name Type Description
name string

The name of the entity

Source:

Methods

addAlias(alias) → {boolean}

Indicate that an entity has another name on another map.

Parameters:
Name Type Description
alias Entity

The Entity on the different map

Source:
Returns:

if the entity alias was successfully added returns true, false otherwise.

Type
boolean

aliasesToString() → {string}

Source:
Returns:

string representation of this entity's aliases.

Type
string

getName() → {string}

Getter for name

Source:
Returns:

Name of this entity.

Type
string

getPlacements() → {object}

Getter for placements

Source:
Returns:

Hash mapping placement keys to placements.

Type
object

setOccupancy(occupancy) → {boolean}

Specify the location of an entity that is on a map

Parameters:
Name Type Description
occupancy Occupancy

The location of the entity with respect to its map

Source:
Returns:

true if the location was successfully set, false otherwise.

Type
boolean

setPlacement(placement) → {boolean}

Specify the location of an entity that is on a map

Parameters:
Name Type Description
placement Placement

The location of the entity with respect to its map

Source:
Returns:

true if the location was successfully set, false otherwise.

Type
boolean

toString() → {string}

Source:
Returns:

string representation of this object.

Type
string