Cell.getVisualNeighbor

Get a visual neighbour in given direction — this will take cell offset into account.

class Cell
getVisualNeighbor
(
ubyte direction
)

Parameters

direction ubyte

0 for negative Y, 1 for positive X, 2 for positive Y, 3 for negative X. Calling with other values is invalid.

Return Value

Type: Cell

The queried cell within the same layer. null if not found

Meta