Skip to content

Latest commit

 

History

History
253 lines (180 loc) · 8.99 KB

EntityHandler.md

File metadata and controls

253 lines (180 loc) · 8.99 KB

EntityHandler

EntityHandler : object

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.humans : Array.<string>

Array includes EntityName of humans

Kind: static property of EntityHandler

EntityHandler.surfaces : Array.<string>

Array includes EntityName of surfaces

Kind: static property of EntityHandler

EntityHandler.buildings : Array.<string>

Array includes EntityName of buildings

Kind: static property of EntityHandler

EntityHandler.roads : Array.<string>

Array includes EntityName of roads

Kind: static property of EntityHandler

EntityHandler.blockades : Array.<string>

Array includes EntityName of blockades

Kind: static property of EntityHandler

EntityHandler.getColor(entity) ⇒ Array.<float>

Get color of Entity

Kind: static method of EntityHandler
Returns: Array.<float> - - color

Param Type Description
entity Object entity object

EntityHandler.getType(entity) ⇒ string

Get EntityName of Entity

Kind: static method of EntityHandler
Returns: string - entity name

Param Type Description
entity Object entity object

EntityHandler.getHP(entity) ⇒ integer

Get HP value of Entity

Kind: static method of EntityHandler
Returns: integer - HP

Param Type Description
entity Object entity object

EntityHandler.getIcon(entity) ⇒ string | boolean

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

EntityHandler.isRoad(entity) ⇒ boolean

Is Road

Kind: static method of EntityHandler
Returns: boolean - Is Road

Param Type Description
entity Object entity object

EntityHandler.isHuman(entity) ⇒ boolean

Is Human

Kind: static method of EntityHandler
Returns: boolean - Is Human

Param Type Description
entity Object entity object

EntityHandler.isSurface(entity) ⇒ boolean

Is Surface

Kind: static method of EntityHandler
Returns: boolean - Is Surface

Param Type Description
entity Object entity object

EntityHandler.isBlockade(entity) ⇒ boolean

Is Blockade

Kind: static method of EntityHandler
Returns: boolean - Is Blockade

Param Type Description
entity Object entity object

EntityHandler.isBuilding(entity) ⇒ boolean

Is Building

Kind: static method of EntityHandler
Returns: boolean - Is Building

Param Type Description
entity Object entity object

EntityHandler.getId(entity) ⇒ integer

Get ID

Kind: static method of EntityHandler
Returns: integer - entity id

Param Type Description
entity Object entity object

EntityHandler.getPositionHistory(entity) ⇒ Array.<float>

Get position history

Kind: static method of EntityHandler
Returns: Array.<float> - line sequence

Param Type Description
entity Object entity object

EntityHandler.getCenterOfPolygon(entity) ⇒ Array.<float> | boolean

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

EntityHandler.getHumanVertices(cx, cy, r, cuts) ⇒ Array.<float>

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

EntityHandler.getVertices(entity) ⇒ Array.<float>

Get vertices of entity

Kind: static method of EntityHandler
Returns: Array.<float> - - vertices

Param Type Description
entity Object entity object