refactor(monster&hero): 重构三路分层逻辑与渲染排序
1. 移除飞行怪特殊判定,统一按Y轴高度处理三路渲染 2. 重命名飞行层相关变量为更准确的路次命名 3. 新增英雄自动分路均衡分配逻辑 4. 调整渲染排序规则,按Y轴高度决定上下层显示顺序 5. 修复怪物入场动画与刷怪分路逻辑
This commit is contained in:
@@ -139,10 +139,8 @@ export class MonMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpda
|
||||
const inRange = this.isEnemyInAttackRange(model, selfX, enemyX);
|
||||
|
||||
// 接触判定距离,只有接触英雄才停止移动
|
||||
// 飞行怪忽略接触碰撞,不被阻挡
|
||||
const isFly = move.baseY > 50;
|
||||
const touchDistance = 50;
|
||||
const isTouching = !isFly && (dist <= touchDistance);
|
||||
const isTouching = dist <= touchDistance;
|
||||
|
||||
// 攻击判定
|
||||
if (inRange) {
|
||||
|
||||
Reference in New Issue
Block a user