refactor: 移除全局主角引用,改用ECS查询定位主角实体
- 移除 SingletonModuleComp 中的 role 字段及相关设置 - 在 MissionComp 中移除重置 role 的代码 - 修改 Hero 类的销毁方法,不再清理 role 引用 - 在 MissionCardComp 中通过 HeroMasterComp 查询来定位主角实体 - 增加详细调试日志以追踪天赋、技能等组件的添加过程
This commit is contained in:
@@ -157,7 +157,7 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
};
|
||||
|
||||
/** 主角实体引用 */
|
||||
role: ecs.Entity | null = null;
|
||||
// role: ecs.Entity | null = null;
|
||||
|
||||
/**
|
||||
* 记录天赋获取
|
||||
|
||||
Reference in New Issue
Block a user