fix: 调整UI元素布局与合并规则默认值

- 在 MissionCardComp 中调整合并规则的默认值和兜底逻辑,使其与 MissionHeroComp 保持一致
- 调整多个 prefab 中 UI 元素的位置、尺寸、字体样式和激活状态,优化界面布局
This commit is contained in:
panw
2026-04-03 10:46:20 +08:00
parent 623a3b7fc2
commit 6e0bceff7c
4 changed files with 44 additions and 44 deletions

View File

@@ -5198,8 +5198,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -70.914,
"y": 99.501,
"x": -64.714,
"y": 96.745,
"z": 0
},
"_lrot": {
@@ -5387,8 +5387,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"x": -1.378,
"y": 1.378,
"z": 0
},
"_lrot": {
@@ -7965,8 +7965,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -102.964,
"x": 64.752,
"y": 97.818,
"z": 0
},
"_lrot": {
@@ -8016,7 +8016,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 265.066,
"y": 0,
"z": 0
},
"_lrot": {
@@ -8152,7 +8152,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 265.066,
"y": 0,
"z": 0
},
"_lrot": {
@@ -8291,7 +8291,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 265.066,
"y": 0,
"z": 0
},
"_lrot": {
@@ -8430,7 +8430,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 265.066,
"y": 0,
"z": 0
},
"_lrot": {

View File

@@ -3940,7 +3940,7 @@
"__id__": 184
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 190

View File

@@ -8137,7 +8137,7 @@
"__id__": 403
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 405
@@ -8151,7 +8151,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 20,
"x": 0,
"y": 0,
"z": 0
},
@@ -8192,7 +8192,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50,
"width": 100,
"height": 30
},
"_anchorPoint": {
@@ -8287,7 +8287,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -25.878,
"x": -31.395,
"y": 0,
"z": 0
},
@@ -8328,8 +8328,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 35,
"height": 35
"width": 30,
"height": 30
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -8365,7 +8365,7 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@ec5a5",
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@4b5bf",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
@@ -8381,7 +8381,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4",
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
@@ -8430,7 +8430,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 28,
"x": 17.886,
"y": 0,
"z": 0
},
@@ -8483,7 +8483,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -21.5615234375,
"x": -18.78076171875,
"y": 1.7390000000000043,
"z": 0
},
@@ -8669,7 +8669,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 33.8076171875,
"width": 28.24609375,
"height": 56.4
},
"_anchorPoint": {
@@ -8708,8 +8708,8 @@
"_string": "10",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 25,
"_fontSize": 25,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
@@ -8718,7 +8718,7 @@
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": true,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
@@ -9598,7 +9598,7 @@
"__id__": 465
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 467
@@ -9612,7 +9612,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 20,
"x": 0,
"y": 0,
"z": 0
},
@@ -9653,7 +9653,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50,
"width": 100,
"height": 30
},
"_anchorPoint": {
@@ -9748,8 +9748,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -24.726,
"y": 2.704,
"x": -30.243,
"y": 0,
"z": 0
},
"_lrot": {
@@ -9789,8 +9789,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 35,
"height": 35
"width": 30,
"height": 30
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -9826,7 +9826,7 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@ec5a5",
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@4b5bf",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
@@ -9842,7 +9842,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4",
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
@@ -9891,8 +9891,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 28,
"y": 2.704,
"x": 17.886,
"y": 0,
"z": 0
},
"_lrot": {
@@ -9944,7 +9944,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -21.5615234375,
"x": -18.78076171875,
"y": 1.739,
"z": 0
},
@@ -10130,7 +10130,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 33.8076171875,
"width": 28.24609375,
"height": 56.4
},
"_anchorPoint": {
@@ -10169,8 +10169,8 @@
"_string": "12",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 25,
"_fontSize": 25,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
@@ -10179,7 +10179,7 @@
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": true,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,

View File

@@ -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 };
}