清理之前文件 + 再次取消碰撞检测

This commit is contained in:
2025-03-27 12:15:02 +08:00
parent 63e182e214
commit 3a15541170
33 changed files with 220 additions and 1130 deletions

View File

@@ -19,9 +19,9 @@ export class BattleMoveSystem extends ecs.ComblockSystem implements ecs.ISystemU
if (!move.moving) return;
// 检测攻击范围内是否有敌人
// 检测友方碰撞和敌方攻击范围
const alliesStop = this.checkAlliesInProximity(e);
// const alliesStop = this.checkAlliesInProximity(e);
const enemiesStop = this.checkEnemiesInRange(e, view.dis);
const shouldStop = alliesStop || enemiesStop;
const shouldStop = enemiesStop;
view.is_atking = shouldStop;
// 同步状态
@@ -96,15 +96,15 @@ export class BattleMoveSystem extends ecs.ComblockSystem implements ecs.ISystemU
}
// 获取前一个单位uuid比当前小的最近单位
const prevUnit = sortedAllies[currentIndex - 1];
const prevView = prevUnit.get(HeroViewComp);
const distToPrev = Math.abs(currentPos.x - prevView.node.position.x);
// const prevUnit = sortedAllies[currentIndex - 1];
// const prevView = prevUnit.get(HeroViewComp);
// const distToPrev = Math.abs(currentPos.x - prevView.node.position.x);
// 如果与前一个单位距离小于安全距离,则停止
if (distToPrev < SAFE_DISTANCE) {
current.is_stop_temp = true;
return true;
}
// if (distToPrev < SAFE_DISTANCE) {
// current.is_stop_temp = true;
// return true;
// }
// 如果与前一个单位距离大于安全距离,则移动
current.is_stop_temp = false;