feat(map): 新增英雄出售事件并更新场上英雄数量UI

- 新增GameEvent.HeroSell事件枚举,在英雄出售时派发通知
- 在HInfoComp中添加事件派发代码,在MissionCardComp中注册监听更新UI
- 调整英雄统计逻辑与事件派发逻辑,简化最大英雄数量获取函数
- 为多款英雄预制体添加影子显示组件
This commit is contained in:
walkpan
2026-05-24 22:34:20 +08:00
parent 429c07cc79
commit dfaa55b864
9 changed files with 1073 additions and 441 deletions

View File

@@ -300,12 +300,6 @@ export class BattleEntityLifecycleSystem extends ecs.ComblockSystem
const label = this.resolveLabel(heroAttrs);
if (heroAttrs) {
mLogger.log(heroAttrs.debugMode, 'BattleEntityLifecycle', `${label}离开世界: ${heroAttrs.hero_name}`);
if (heroAttrs.fac === FacSet.HERO) {
oops.message.dispatchEvent(GameEvent.HeroDead, {
eid: e.eid,
model: heroAttrs
});
}
} else {
mLogger.log(true, 'BattleEntityLifecycle', `${label}离开世界: 实体ID ${e.eid}`);
}