Skip to content

Classes

GlobalDescription
TilemapPIXI.Container

Functions

GlobalDescription
addChild(child)Object

向容器添加子对象。 Adds a child to the container.

addChildAt(child, index)Object

在指定索引位置向容器添加子对象。 Adds a child to the container at a specified index.

removeChild(child)Object

从容器中移除子对象。 Removes a child from the container.

removeChildAt(index)Object

从指定索引位置移除子对象。 Removes a child from the specified index position.

initialize()

初始化瓦片地图。 Initializes the tilemap.

setData(width, height, data)

设置瓦片地图数据。 Sets the tilemap data.

isReady()Boolean

检查瓦片集是否已准备好渲染。 Checks whether the tileset is ready to render.

update()

为每一帧更新瓦片地图。 Updates the tilemap for each frame.

refresh()

强制重绘整个瓦片地图。 Forces to repaint the entire tilemap.

refreshTileset()

强制刷新瓦片集。 Forces to refresh the tileset.

Tilemap ⇐ PIXI.Container

Kind: global class
Extends: PIXI.Container


new Tilemap()

显示 2D 瓦片游戏地图的瓦片地图。
The tilemap which displays 2D tile-based game map.


addChild(child) ⇒ Object

向容器添加子对象。
Adds a child to the container.

Kind: global function
Returns: Object - 添加的子对象 The child that was added

ParamTypeDescription
childObject要添加的子对象 The child to add

addChildAt(child, index) ⇒ Object

在指定索引位置向容器添加子对象。
Adds a child to the container at a specified index.

Kind: global function
Returns: Object - 添加的子对象 The child that was added

ParamTypeDescription
childObject要添加的子对象 The child to add
indexNumber放置子对象的索引 The index to place the child in

removeChild(child) ⇒ Object

从容器中移除子对象。
Removes a child from the container.

Kind: global function
Returns: Object - 被移除的子对象 The child that was removed

ParamTypeDescription
childObject要移除的子对象 The child to remove

removeChildAt(index) ⇒ Object

从指定索引位置移除子对象。
Removes a child from the specified index position.

Kind: global function
Returns: Object - 被移除的子对象 The child that was removed

ParamTypeDescription
indexNumber获取子对象的索引 The index to get the child from

initialize()

初始化瓦片地图。
Initializes the tilemap.

Kind: global function


setData(width, height, data)

设置瓦片地图数据。
Sets the tilemap data.

Kind: global function

ParamTypeDescription
widthNumber地图宽度(瓦片数量) The width of the map in number of tiles
heightNumber地图高度(瓦片数量) The height of the map in number of tiles
dataArray地图数据的一维数组 The one dimensional array for the map data

isReady() ⇒ Boolean

检查瓦片集是否已准备好渲染。
Checks whether the tileset is ready to render.

Kind: global function
Returns: Boolean - 如果瓦片地图准备就绪则为 true True if the tilemap is ready


update()

为每一帧更新瓦片地图。
Updates the tilemap for each frame.

Kind: global function


refresh()

强制重绘整个瓦片地图。
Forces to repaint the entire tilemap.

Kind: global function


refreshTileset()

强制刷新瓦片集。
Forces to refresh the tileset.

Kind: global function


贡献者

暂无相关贡献者

页面历史

暂无最近变更历史
最近更新