ItemLayer

Methods
14
Fields
None

Getting one

scene:tileAt(…):getItemLayer()

Methods

MethodReturnsDescription
getHeight()numberThe pile's height: the tallest object on its tile, which the items are drawn on top of.
getTop()TileItem?The most valuable item, drawn first (walk the rest with Tile:getGroundItems()).
getMiddle()TileItem?The second item drawn, if any (the next most valuable of another id).
getBottom()TileItem?The third item drawn, if any.
getHash()numberThe pile's scene tag (type 3); past 2^53 (it raises) for a pile of world view 2 or above: getHashString().
getHashString()stringgetHash() as its decimal string, exact for every world view.
getX()numberThe local x of its tile's centre.
getY()numberThe local y of its tile's centre.
getZ()numberThe ground height at its tile, where it was placed.
getPlane()numberThe plane of its tile.
getWorldView()WorldViewThe world view it is in.
getWorldLocation()WorldPointIts tile's world location.
getLocalLocation()LocalPointIts tile's centre as a local point.
equals(any)booleanWhether other equals this ItemLayer, as == answers it (false for a value of another class).

Returned by

MethodReturnsDescription
Tile.getItemLayerItemLayer?Its item pile, if any items lie on it.

Method details

getHeight

getHeight: (ItemLayer) -> number

The pile's height: the tallest object on its tile, which the items are drawn on top of.

getTop

getTop: (ItemLayer) -> TileItem?

The most valuable item, drawn first (walk the rest with Tile:getGroundItems()).

getHash

getHash: (ItemLayer) -> number

The pile's scene tag (type 3); past 2^53 (it raises) for a pile of world view 2 or above: getHashString().

getZ

getZ: (ItemLayer) -> number

The ground height at its tile, where it was placed.

equals

equals: (ItemLayer, any) -> boolean

Whether other equals this ItemLayer, as == answers it (false for a value of another class).