fix(game): 修复底部塔面板不可见问题,改用React层实现,并用AI素材替换Graphics像素块
This commit is contained in:
@@ -106,8 +106,8 @@ export class TowerManager {
|
||||
|
||||
const hasTarget = enemies.some((e) => {
|
||||
if (e.isDead) return false
|
||||
const dx = e.sprite.x - tower['px']
|
||||
const dy = e.sprite.y - tower['py']
|
||||
const dx = e.x - tower['px']
|
||||
const dy = e.y - tower['py']
|
||||
return Math.sqrt(dx * dx + dy * dy) <= tower.attackRange * TILE_SIZE
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user