refactor: 移除全局主角引用,改用ECS查询定位主角实体

- 移除 SingletonModuleComp 中的 role 字段及相关设置
- 在 MissionComp 中移除重置 role 的代码
- 修改 Hero 类的销毁方法,不再清理 role 引用
- 在 MissionCardComp 中通过 HeroMasterComp 查询来定位主角实体
- 增加详细调试日志以追踪天赋、技能等组件的添加过程
This commit is contained in:
panw
2026-02-03 15:56:22 +08:00
parent 63dd22fb88
commit 147131d3c2
4 changed files with 25 additions and 38 deletions

View File

@@ -157,7 +157,7 @@ export class SingletonModuleComp extends ecs.Comp {
};
/** 主角实体引用 */
role: ecs.Entity | null = null;
// role: ecs.Entity | null = null;
/**
* 记录天赋获取