feat(渲染): 重构渲染层级管理并添加BOSS层级

移除动态渲染层级更新逻辑,改为在实体加载时设置固定层级
- 在Hero和Monster的load方法中设置初始siblingIndex
- 添加BOSS枚举值到IndexSet
- 为Monster添加溢出保护,防止层级索引过大
- 删除墓地位置判断等不再需要的逻辑
This commit is contained in:
2025-11-03 13:36:33 +08:00
parent 96952ef493
commit 9fcb6d3121
6 changed files with 20 additions and 71 deletions

View File

@@ -56,11 +56,7 @@ export class HeroMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
return;
}
// 新增墓地位置判断,如果已经在墓地则不再移动
if (view.node.position.x === -1000 || view.node.position.x === 1000) {
view.status_change("idle");
return;
}
// 英雄阵营特殊逻辑:根据职业区分行为
const hasEnemies = this.checkEnemiesExist(e);