fix(game): 修复输了能进下一关的Bug、换关后塔残留、召唤按钮太小、战斗前不能发激励

This commit is contained in:
Cloud Bot
2026-03-24 08:30:03 +00:00
parent d7253c45be
commit 653c54c06f
4 changed files with 53 additions and 23 deletions

View File

@@ -258,6 +258,17 @@ export class TowerManager {
return this.towers
}
/** 切换地图时清除所有防御塔(静默销毁,不播放音效) */
clearAllTowers(): void {
for (const tower of this.towers) {
tower.destroy()
}
this.towers = []
this.occupiedCells.clear()
this.infoLabel?.destroy()
this.infoLabel = null
}
hasTowerAt(gridX: number, gridY: number): boolean {
return this.occupiedCells.has(`${gridX},${gridY}`)
}