fix: 动静转换的 keepEvent 问题

This commit is contained in:
AncTe committed 2026-10-22 20:18:31 +08:00
1 parent 9d4b4f5d9f
commit d5b2a820d8
1 file changed
+4 -4
+4 -4
View File
@@ -358,12 +358,12 @@ export class MapLayer
}
this.setBlock(0, x, y);
const tile = this.createDynamic(num, x, y);
if (keepEvent) {
const staticTile = this.getTile(x, y);
if (staticTile) {
const staticTile = this.getTile(x, y);
if (staticTile) {
if (keepEvent) {
tile.syncTileEvent(staticTile);
staticTile.tileEvent().clear();
}
staticTile.tileEvent().clear();
}
return tile;
}