Skip to main content

getTileTag

getTileTag

类型: MethodDeclaration

所属类: SceneTilemap

定义位置: scene.ts

参数

参数名类型描述默认值
xnumber--
ynumber--

返回值

类型: number

源代码

位置: 第 2809 行

public getTileTag(x: number, y: number): number {
if (x >= this.tileStartX && x < this.tileEndX && y >= this.tileStartY && y < this.tileEndY) {
const tx = x - this.tileStartX
const ty = y - this.tileStartY
const tile = this.tiles[tx + ty * this.width]
return this.tileData[tile & 0xffffff00]?.tag ?? 0
}
return 0
}

文档生成时间:2026/2/1 16:51:40