refactor: 整理技能与战斗相关的配置与逻辑

1.  新增技能飞行距离配置项,支持自定义直线技能飞行距离
2.  调整英雄后退击退范围从30改为20
3.  重构击退逻辑,统一敌我双方的边界钳制处理
4.  优化Boss数值配置,固定基础面板为初始英雄2倍强度
5.  修正技能6006的动画资源引用为atk1
6.  调整近战英雄默认停火距离从80改为60
7.  更新注释文档与配置注释,优化代码可读性
This commit is contained in:
panFD
2026-08-14 00:36:26 +08:00
parent 4fee02d82e
commit df0dedba75
12 changed files with 301 additions and 55 deletions

View File

@@ -83,21 +83,36 @@ export class SMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
const direction = new Vec3();
Vec3.subtract(direction, originTargetPos, adjustedStartPos);
// 延长终止点统一消亡点的x坐标为 +-500
const targetX = moveComp.scale > 0 ? 500 : -500;
let targetY = originTargetPos.y;
let adjustedTargetPos: Vec3;
if (moveComp.distance > 0) {
// 距离模式:沿起始指向目标的方向飞行固定距离
if (direction.length() < 0.01) {
// 起终点重合时退化为按朝向水平飞行
direction.set(moveComp.scale > 0 ? 1 : -1, 0, 0);
}
direction.normalize();
adjustedTargetPos = v3(
adjustedStartPos.x + direction.x * moveComp.distance,
adjustedStartPos.y + direction.y * moveComp.distance,
originTargetPos.z
);
} else {
// 延长终止点统一消亡点的x坐标为 +-500
const targetX = moveComp.scale > 0 ? 500 : -500;
let targetY = originTargetPos.y;
if (Math.abs(direction.x) > 0.01) {
const slope = direction.y / direction.x;
targetY = adjustedStartPos.y + slope * (targetX - adjustedStartPos.x);
if (Math.abs(direction.x) > 0.01) {
const slope = direction.y / direction.x;
targetY = adjustedStartPos.y + slope * (targetX - adjustedStartPos.x);
}
adjustedTargetPos = v3(
targetX,
targetY,
originTargetPos.z
);
}
const adjustedTargetPos = v3(
targetX,
targetY,
originTargetPos.z
);
moveComp.startPos.set(adjustedStartPos);
moveComp.targetPos.set(adjustedTargetPos);
node.setPosition(adjustedStartPos);