Harvestable.getInitialHash

Gets the initial hash of a kinematic. The initial hash identifies the kinematic by its initial world position, uuid and world id.

Kind: Function

Environments: Game

Game

harvestable:getInitialHash(  )

Open the full Game reference

This can be used to match kinematics spawned from the same entity in a tile even though each loaded kinematic is technically a different object.

Parameters:

Name Type Description
harvestable Harvestable The kinematic to get the initial hash from.

Returns:

Type Description
number The initial hash. Returns 0 if the harvestable is not kinematic.