fix(game): 修复召唤按钮第二次失效和实习生不攻击的Bug
This commit is contained in:
@@ -100,7 +100,8 @@ export abstract class TowerBase {
|
||||
}
|
||||
|
||||
protected findTarget(enemies: EnemyBase[]): EnemyBase | null {
|
||||
const rangePx = this.attackRange * this.cellW
|
||||
// +0.5格容忍量,避免怪物恰好在射程边界时因浮点误差漏判
|
||||
const rangePx = (this.attackRange + 0.5) * this.cellW
|
||||
let best: EnemyBase | null = null
|
||||
let bestProgress = -1
|
||||
for (const e of enemies) {
|
||||
|
||||
Reference in New Issue
Block a user