Link Search Menu Expand Document

Tilemap.d overview


Table of contents


utils

Tilemap (class)

The tilemap which displays 2D tile-based game map.

Signature

export declare class Tilemap {
  constructor()
}

isVisibleTile (static method)

Signature

static isVisibleTile(tileId: TileID): boolean

isAutotile (static method)

Signature

static isAutotile(tileId: TileID): boolean

getAutotileKind (static method)

Signature

static getAutotileKind(tileId: TileID): number

getAutotileShape (static method)

Signature

static getAutotileShape(tileId: TileID): number

makeAutotileId (static method)

Signature

static makeAutotileId(kind: number, shape: number): number

isSameKindTile (static method)

Signature

static isSameKindTile(tileID1: number, tileID2: number): boolean

isTileA1 (static method)

Signature

static isTileA1(tileId: TileID): boolean

isTileA2 (static method)

Signature

static isTileA2(tileId: TileID): boolean

isTileA3 (static method)

Signature

static isTileA3(tileId: TileID): boolean

isTileA4 (static method)

Signature

static isTileA4(tileId: TileID): boolean

isTileA5 (static method)

Signature

static isTileA5(tileId: TileID): boolean

isWaterTile (static method)

Signature

static isWaterTile(tileId: TileID): boolean

isWaterfallTile (static method)

Signature

static isWaterfallTile(tileId: TileID): boolean

isGroundTile (static method)

Signature

static isGroundTile(tileId: TileID): boolean

isShadowingTile (static method)

Signature

static isShadowingTile(tileId: TileID): boolean

isRoofTile (static method)

Signature

static isRoofTile(tileId: TileID): boolean

isWallTopTile (static method)

Signature

static isWallTopTile(tileId: TileID): boolean

isWallSideTile (static method)

Signature

static isWallSideTile(tileId: TileID): boolean

isWallTile (static method)

Signature

static isWallTile(tileId: TileID): boolean

isFloorTypeAutotile (static method)

Signature

static isFloorTypeAutotile(tileId: TileID): boolean

isWallTypeAutotile (static method)

Signature

static isWallTypeAutotile(tileId: TileID): boolean

isWaterfallTypeAutotile (static method)

Signature

static isWaterfallTypeAutotile(tileId: TileID): boolean

destroy (method)

Destroys the tilemap.

Signature

destroy(): void

setData (method)

Sets the tilemap data.

Signature

setData(width: number, height: number, data: number[]): void

isReady (method)

Checks whether the tileset is ready to render.

Signature

isReady(): boolean

update (method)

Updates the tilemap for each frame.

Signature

update(): void

setBitmaps (method)

Sets the bitmaps used as a tileset.

Signature

setBitmaps(bitmaps: Bitmap[]): void

refresh (method)

Forces to repaint the entire tilemap.

Signature

refresh(): void

updateTransform (method)

Updates the transform on all children of this container for rendering.

Signature

updateTransform(): void

_createLayers (method)

Signature

_createLayers(): void

_updateBitmaps (method)

Signature

_updateBitmaps(): void

_addAllSpots (method)

Signature

_addAllSpots(startX: number, startY: number): void

_addSpot (method)

Signature

_addSpot(startX: number, startY: number, x: number, y: number): void

_addSpotTile (method)

Signature

_addSpotTile(tileId: TileID, dx: number, dy: number): void

_addTile (method)

Signature

_addTile(layer: Tilemap.Layer, tileId: TileID, dx: number, dy: number): void

_addNormalTile (method)

Signature

_addNormalTile(layer: Tilemap.Layer, tileId: TileID, dx: number, dy: number): void

_addAutotile (method)

Signature

_addAutotile(layer: Tilemap.Layer, tileId: TileID, dx: number, dy: number): void

_addTableEdge (method)

Signature

_addTableEdge(layer: Tilemap.Layer, tileId: TileID, dx: number, dy: number): void

_addShadow (method)

Signature

_addShadow(layer: Tilemap.Layer, shadowBits: number, dx: number, dy: number): void

_readMapData (method)

Signature

_readMapData(x: number, y: number, z: number): number

_isHigherTile (method)

Signature

_isHigherTile(tileId: TileID): boolean

_isTableTile (method)

Signature

_isTableTile(tileId: TileID): boolean

_isOverpassPosition (method)

Signature

_isOverpassPosition(_mx?: number, _my?: number): boolean

_sortChildren (method)

Signature

_sortChildren(): void

_compareChildOrder (method)

Signature

_compareChildOrder(a: Sprite, b: Sprite): number

_width (property)

Signature

_width: number

_height (property)

Signature

_height: number

_margin (property)

Signature

_margin: number

_mapWidth (property)

Signature

_mapWidth: number

_mapHeight (property)

Signature

_mapHeight: number

_mapData (property)

Signature

_mapData: number[] | null

_bitmaps (property)

Signature

_bitmaps: Bitmap[]

_needsBitmapsUpdate (property)

Signature

_needsBitmapsUpdate: boolean

_needsRepaint (property)

Signature

_needsRepaint: boolean

_lowerLayer (property)

Signature

_lowerLayer: Tilemap.Layer

_upperLayer (property)

Signature

_upperLayer: Tilemap.Layer

animationFrame (property)

Signature

animationFrame: number

_lastAnimationFrame (property)

Signature

_lastAnimationFrame: number

_lastStartX (property)

Signature

_lastStartX: number

_lastStartY (property)

Signature

_lastStartY: number

tileWidth (property)

The width of each tile.

Signature

tileWidth: number

tileHeight (property)

The height of each tile.

Signature

tileHeight: number

origin (property)

The origin point of the tilemap for scrolling.

Signature

origin: Point

flags (property)

The tileset flags.

Signature

flags: number[]

animationCount (property)

The animation count for autotiles.

Signature

animationCount: number

horizontalWrap (property)

Whether the tilemap loops horizontal.

Signature

horizontalWrap: boolean

verticalWrap (property)

Whether the tilemap loops vertical.

Signature

verticalWrap: boolean