TileMat
Hierarchy
↳ TileMat
Index
Properties
Methods
Properties
Static
Protected
centerX
▪ centerX: number
Defined in id/position/mat.ts:6
Static
Protected
centerY
▪ centerY: number
Defined in id/position/mat.ts:7
Static
Readonly
matrixColumns
▪ matrixColumns: number
Defined in id/position/tileMat.ts:8
Static
Readonly
matrixMaxX
▪ matrixMaxX: number
Defined in id/position/tileMat.ts:5
Static
Readonly
matrixMaxY
▪ matrixMaxY: number
Defined in id/position/tileMat.ts:6
Static
Readonly
matrixMinX
▪ matrixMinX: number
Defined in id/position/tileMat.ts:3
Static
Readonly
matrixMinY
▪ matrixMinY: number
Defined in id/position/tileMat.ts:4
Static
Readonly
matrixRows
▪ matrixRows: number
Defined in id/position/tileMat.ts:7
Static
Protected
maxX
▪ maxX: number
Defined in id/position/mat.ts:4
Static
Protected
maxY
▪ maxY: number
Defined in id/position/mat.ts:5
Static
Protected
minX
▪ minX: number
Defined in id/position/mat.ts:2
Static
Protected
minY
▪ minY: number
Defined in id/position/mat.ts:3
Methods
Static
getTileCenter
▸ getTileCenter(row
: number | undefined, column
: number | undefined): object | undefined
Defined in id/position/tileMat.ts:18
Get center of the tile position.
Parameters:
Name | Type | Description |
---|---|---|
row | number | undefined | Target row number. |
column | number | undefined | Target column number. |
Returns: object | undefined
Center position x, y of the specified row/column as {x: number, y: number}
. If specified row/column is invalid, this function returns undefined.
Static
getTileColumn
▸ getTileColumn(x
: number | undefined): number | undefined
Defined in id/position/tileMat.ts:101
Get column index number of the tile matrix.
Parameters:
Name | Type | Description |
---|---|---|
x | number | undefined | X coordinate of checking target point. |
Returns: number | undefined
Column index number.
Static
getTileMatrixIndex
▸ getTileMatrixIndex(x
: number | undefined, y
: number | undefined): object | undefined
Defined in id/position/tileMat.ts:49
Get matrix index of simple play(tile) mat.
Parameters:
Name | Type | Description |
---|---|---|
x | number | undefined | X coordinate of checking target point. |
y | number | undefined | Y coordinate of checking target point. |
Returns: object | undefined
row/column numbers as {row: number, column: number}
. If specified (x, y) is not on toio Collection tile mat, this function returns undefined.
Static
getTileRow
▸ getTileRow(y
: number | undefined): number | undefined
Defined in id/position/tileMat.ts:74
Get row index number of the tile matrix.
Parameters:
Name | Type | Description |
---|---|---|
y | number | undefined | Y coordinate of checking target point. |
Returns: number | undefined
Row index number.
Static
isOnMat
▸ isOnMat(x
: number | undefined, y
: number | undefined): boolean
Defined in id/position/mat.ts:17
Specified coordinate is on the mat or not.
Parameters:
Name | Type | Description |
---|---|---|
x | number | undefined | X coordinate of checking target point. |
y | number | undefined | Y coordinate of checking target point. |
Returns: boolean
true iff specified (x, y) is on this mat.