fix: 调整UI元素布局与合并规则默认值
- 在 MissionCardComp 中调整合并规则的默认值和兜底逻辑,使其与 MissionHeroComp 保持一致 - 调整多个 prefab 中 UI 元素的位置、尺寸、字体样式和激活状态,优化界面布局
This commit is contained in:
@@ -269,13 +269,13 @@ export class MissionCardComp extends CCComp {
|
||||
}
|
||||
|
||||
private getMergeRule(): { needCount: number, maxLv: number } {
|
||||
let needCount = 2;
|
||||
let maxLv = 3;
|
||||
let needCount = 3;
|
||||
let maxLv = 2; // 兜底值改为2,与 MissionHeroComp 保持一致
|
||||
ecs.query(ecs.allOf(MissionHeroCompComp)).forEach((entity: ecs.Entity) => {
|
||||
const comp = entity.get(MissionHeroCompComp);
|
||||
if (!comp) return;
|
||||
needCount = comp.merge_need_count === 2 ? 2 : 3;
|
||||
maxLv = Math.max(1, Math.floor(comp.merge_max_lv ?? 3));
|
||||
maxLv = Math.max(1, Math.floor(comp.merge_max_lv ?? 2));
|
||||
});
|
||||
return { needCount, maxLv };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user