feat: 完善内置特殊属性

This commit is contained in:
AncTe committed 2026-10-16 20:30:04 +08:00
1 parent a0e402728e
commit 3f74d5f25e
10 files changed
+221 -16

No files matched your search

@@ -450,6 +450,21 @@ export class MapLayer
this.forEachHook(hook => hook.onUpdateDynamicPosition?.(tile));
}
async moveBlock(
x: number,
y: number,
direction: FaceDirection,
count: number = 1,
time: number = 500,
keepEvent: boolean = true
): Promise<void> {
const dynamic = this.transferToDynamic(x, y, keepEvent);
if (!dynamic) return;
dynamic.mover.speed(time).step(direction, count);
await dynamic.mover.start()?.onEnd;
this.transferToStatic(dynamic, keepEvent);
}
//#endregion
//#region 开关门