fix(game): 修复输了能进下一关的Bug、换关后塔残留、召唤按钮太小、战斗前不能发激励
This commit is contained in:
@@ -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}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user