mirror of
https://github.com/motajs/template.git
synced 2026-10-30 04:40:18 +08:00
fix: 动静转换的 keepEvent 问题
This commit is contained in:
parent
9d4b4f5d9f
commit
d5b2a820d8
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user