Kind: global namespace
Properties
Name | Type | Description |
---|---|---|
humans | Array.<string> |
|
surfaces | Array.<string> |
|
buildings | Array.<string> |
|
roads | Array.<string> |
|
blockades | Array.<string> |
|
getColor | function |
Get color of entity |
getType | function |
Get EntityName of Entity |
getHP | function |
Get HP value of Entity |
getIcon | function |
Get related icon of entity |
isRoad | function |
Is Road |
isHuman | function |
Is Humand |
isSurface | function |
Is Surface |
isBlockade | function |
Is Blockade |
isBuilding | function |
Is Building |
getId | function |
Get ID |
getCenterOfPolygon | function |
Get center of polygon |
getHumanVertices | function |
Get vertices of humans shape |
getVertices | function |
Get vertices of entity |
- EntityHandler :
object
- .humans :
Array.<string>
- .surfaces :
Array.<string>
- .buildings :
Array.<string>
- .roads :
Array.<string>
- .blockades :
Array.<string>
- .getColor(entity) ⇒
Array.<float>
- .getType(entity) ⇒
string
- .getHP(entity) ⇒
integer
- .getIcon(entity) ⇒
string
|boolean
- .isRoad(entity) ⇒
boolean
- .isHuman(entity) ⇒
boolean
- .isSurface(entity) ⇒
boolean
- .isBlockade(entity) ⇒
boolean
- .isBuilding(entity) ⇒
boolean
- .getId(entity) ⇒
integer
- .getPositionHistory(entity) ⇒
Array.<float>
- .getCenterOfPolygon(entity) ⇒
Array.<float>
|boolean
- .getHumanVertices(cx, cy, r, cuts) ⇒
Array.<float>
- .getVertices(entity) ⇒
Array.<float>
- .humans :
Array includes EntityName of humans
Kind: static property of EntityHandler
Array includes EntityName of surfaces
Kind: static property of EntityHandler
Array includes EntityName of buildings
Kind: static property of EntityHandler
Array includes EntityName of roads
Kind: static property of EntityHandler
Array includes EntityName of blockades
Kind: static property of EntityHandler
Get color of Entity
Kind: static method of EntityHandler
Returns: Array.<float>
- - color
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Get EntityName of Entity
Kind: static method of EntityHandler
Returns: string
- entity name
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Get HP value of Entity
Kind: static method of EntityHandler
Returns: integer
- HP
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Get related icon of entity
Kind: static method of EntityHandler
Returns: string
| boolean
- returns boolean if entity hasn't any icon
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Is Road
Kind: static method of EntityHandler
Returns: boolean
- Is Road
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Is Human
Kind: static method of EntityHandler
Returns: boolean
- Is Human
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Is Surface
Kind: static method of EntityHandler
Returns: boolean
- Is Surface
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Is Blockade
Kind: static method of EntityHandler
Returns: boolean
- Is Blockade
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Is Building
Kind: static method of EntityHandler
Returns: boolean
- Is Building
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Get ID
Kind: static method of EntityHandler
Returns: integer
- entity id
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Get position history
Kind: static method of EntityHandler
Returns: Array.<float>
- line sequence
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Get center of polygon
Kind: static method of EntityHandler
Returns: Array.<float>
| boolean
- coordinates (returns false when entity hasn't apexes)
Param | Type | Description |
---|---|---|
entity | Object |
entity object |
Get vertices of humans shape
Kind: static method of EntityHandler
Returns: Array.<float>
- - apexes
Param | Type | Description |
---|---|---|
cx | float |
X value of humans position |
cy | * |
Y value of humans position |
r | * |
Radius |
cuts | * |
Circle cuts |
Get vertices of entity
Kind: static method of EntityHandler
Returns: Array.<float>
- - vertices
Param | Type | Description |
---|---|---|
entity | Object |
entity object |