fix boss tank cross brick

This commit is contained in:
jakciehan
2026-06-07 22:08:00 +08:00
parent c3a4aa8f15
commit e4140f073f
29 changed files with 2689 additions and 1240 deletions
+2 -2
View File
@@ -262,7 +262,7 @@ class CollisionManager {
* @private
*/
_isPositionValid(tank, x, y) {
const hs = tank.halfSize;
const hs = tank.colliderHalfSize;
const left = x - hs;
const top = y - hs;
const right = x + hs;
@@ -279,7 +279,7 @@ class CollisionManager {
}
// Terrain collision check
if (this._map.rectCollidesWithTerrain(left, top, tank.size, tank.size)) {
if (this._map.rectCollidesWithTerrain(left, top, tank.colliderSize, tank.colliderSize)) {
return false;
}