refactor(渲染): 重构实体层级管理方式

- 移除通过 setSiblingIndex 手动设置层级的方式
- 新增 HERO、LINE1、LINE2、SKILL 等容器节点自动管理层级
- 调整英雄、怪物、技能等实体的父节点到对应容器
- 优化提示信息的位置偏移量
This commit is contained in:
2025-11-04 14:23:07 +08:00
parent 1e0537b63d
commit 087f4010be
7 changed files with 419 additions and 59 deletions

View File

@@ -293,10 +293,10 @@ export class HeroMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
});
// 设置渲染顺序x坐标越大的显示在上层index越大层级越高
sortedUnits.forEach((unit, index) => {
const model = unit.get(HeroViewComp);
model.node.setSiblingIndex(index); // 直接使用indexx坐标大的index大层级高
});
// sortedUnits.forEach((unit, index) => {
// const model = unit.get(HeroViewComp);
// model.node.setSiblingIndex(index); // 直接使用indexx坐标大的index大层级高
// });
}
/** 检查指定位置是否已被占用 */