GridCellsExitArea
Extends: ExitArea
A block of cells in a grid, e.g. a tile map's doorway. Cell [0, 0]'s low corner is at (originX, originY) and columns run along x.
Properties
originX(float)originY(float) — z on the xz planecellSize(float)col(integer)row(integer)cols(integer)rows(integer)
Constructor
new GridCellsExitArea(
originX: float,
originY: float,
cellSize: float,
col: integer,
row: integer,
cols?: integer,
rows?: integer,
plane?: BGE.SeparationPlane,
): GridCellsExitAreaParameters
originX(float) — x of cell [0, 0]'s low corneroriginY(float) — y (z on the xz plane) of cell [0, 0]'s low cornercellSize(float)col(integer) — the block's first columnrow(integer) — the block's first rowcols(integer, optional, default: 1)rows(integer, optional, default: 1)plane(BGE.SeparationPlane, optional, default: "BGE.SeparationPlane.xz")
Instance Methods
cellAt(position: BGE.Math.Vector): Array.<integer>
The cell a position is in, as [col, row].
Parameters
position(BGE.Math.Vector)
Returns
Array.<integer>
contains(position: BGE.Math.Vector): boolean
Parameters
position(BGE.Math.Vector)
Returns
boolean