[英]how can i decrease delay in this.time.addEvent in phaser.js, based on score?
[英]Can I an Identifier for a tile in Phaser.js
所以,我一直在制作一种 2d minecraft,我需要一个 Phaser 方法/函数来通过它们的图块编号来识别每个图块,
例如,当我从一个 tileset 中放置一个 tile 时,我需要它的 tile set no。
this.block = this.worldLayer.putTileAtWorldXY(
6,
this.worldPoint.x,
this.worldPoint.y
);
this.block.setCollision(true);
那个 6 是我的图块集中某个图块的图块编号,我需要一种方法来在我单击它时从任何图块中获取该数字,无论如何都可以这样做吗?
提前致谢
我实际上找到了一种适用于
https://www.html5gamedevs.com/topic/9627-how-to-get-tile-index-property/
使用.getTileAt().index
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.