fix(hero): 修复BOSS怪物层级显示问题

当怪物为BOSS类型时,设置其节点层级为BOSS专用层级,确保BOSS显示在正确层级
This commit is contained in:
2025-11-03 13:39:29 +08:00
parent 9fcb6d3121
commit 2d5653e0e4

View File

@@ -69,6 +69,7 @@ export class Monster extends ecs.Entity {
model.type = hero.type; model.type = hero.type;
model.fac = FacSet.MON; model.fac = FacSet.MON;
model.is_boss = monType == MonType.BOSS; model.is_boss = monType == MonType.BOSS;
if(model.is_boss) node.setSiblingIndex(IndexSet.BOSS);
if(!model.is_boss){ if(!model.is_boss){
model.is_kalami = true; model.is_kalami = true;
} }