new Entity(name)
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the entity |
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 |
Returns:
if the entity alias was successfully added returns true, false otherwise.
- Type
- boolean
aliasesToString() → {string}
Returns:
string representation of this entity's aliases.
- Type
- string
getName() → {string}
Getter for name
Returns:
Name of this entity.
- Type
- string
getPlacements() → {object}
Getter for placements
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 |
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 |
Returns:
true if the location was successfully set, false otherwise.
- Type
- boolean
toString() → {string}
Returns:
string representation of this object.
- Type
- string