fix: 调整UI元素布局与合并规则默认值
- 在 MissionCardComp 中调整合并规则的默认值和兜底逻辑,使其与 MissionHeroComp 保持一致 - 调整多个 prefab 中 UI 元素的位置、尺寸、字体样式和激活状态,优化界面布局
This commit is contained in:
@@ -5198,8 +5198,8 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": -70.914,
|
"x": -64.714,
|
||||||
"y": 99.501,
|
"y": 96.745,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -5387,8 +5387,8 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": -1.378,
|
||||||
"y": 0,
|
"y": 1.378,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -7965,8 +7965,8 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 64.752,
|
||||||
"y": -102.964,
|
"y": 97.818,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -8016,7 +8016,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 265.066,
|
"y": 0,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -8152,7 +8152,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 265.066,
|
"y": 0,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -8291,7 +8291,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 265.066,
|
"y": 0,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -8430,7 +8430,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 265.066,
|
"y": 0,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
|
|||||||
@@ -3940,7 +3940,7 @@
|
|||||||
"__id__": 184
|
"__id__": 184
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": true,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 190
|
"__id__": 190
|
||||||
|
|||||||
@@ -8137,7 +8137,7 @@
|
|||||||
"__id__": 403
|
"__id__": 403
|
||||||
},
|
},
|
||||||
"_children": [],
|
"_children": [],
|
||||||
"_active": false,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 405
|
"__id__": 405
|
||||||
@@ -8151,7 +8151,7 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 20,
|
"x": 0,
|
||||||
"y": 0,
|
"y": 0,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
@@ -8192,7 +8192,7 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 50,
|
"width": 100,
|
||||||
"height": 30
|
"height": 30
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
@@ -8287,7 +8287,7 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": -25.878,
|
"x": -31.395,
|
||||||
"y": 0,
|
"y": 0,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
@@ -8328,8 +8328,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 35,
|
"width": 30,
|
||||||
"height": 35
|
"height": 30
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -8365,7 +8365,7 @@
|
|||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@ec5a5",
|
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@4b5bf",
|
||||||
"__expectedType__": "cc.SpriteFrame"
|
"__expectedType__": "cc.SpriteFrame"
|
||||||
},
|
},
|
||||||
"_type": 0,
|
"_type": 0,
|
||||||
@@ -8381,7 +8381,7 @@
|
|||||||
"_isTrimmedMode": true,
|
"_isTrimmedMode": true,
|
||||||
"_useGrayscale": false,
|
"_useGrayscale": false,
|
||||||
"_atlas": {
|
"_atlas": {
|
||||||
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4",
|
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
|
||||||
"__expectedType__": "cc.SpriteAtlas"
|
"__expectedType__": "cc.SpriteAtlas"
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
@@ -8430,7 +8430,7 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 28,
|
"x": 17.886,
|
||||||
"y": 0,
|
"y": 0,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
@@ -8483,7 +8483,7 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": -21.5615234375,
|
"x": -18.78076171875,
|
||||||
"y": 1.7390000000000043,
|
"y": 1.7390000000000043,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
@@ -8669,7 +8669,7 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 33.8076171875,
|
"width": 28.24609375,
|
||||||
"height": 56.4
|
"height": 56.4
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
@@ -8708,8 +8708,8 @@
|
|||||||
"_string": "10",
|
"_string": "10",
|
||||||
"_horizontalAlign": 1,
|
"_horizontalAlign": 1,
|
||||||
"_verticalAlign": 1,
|
"_verticalAlign": 1,
|
||||||
"_actualFontSize": 25,
|
"_actualFontSize": 20,
|
||||||
"_fontSize": 25,
|
"_fontSize": 20,
|
||||||
"_fontFamily": "Arial",
|
"_fontFamily": "Arial",
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_overflow": 0,
|
"_overflow": 0,
|
||||||
@@ -8718,7 +8718,7 @@
|
|||||||
"_isSystemFontUsed": true,
|
"_isSystemFontUsed": true,
|
||||||
"_spacingX": 0,
|
"_spacingX": 0,
|
||||||
"_isItalic": false,
|
"_isItalic": false,
|
||||||
"_isBold": true,
|
"_isBold": false,
|
||||||
"_isUnderline": false,
|
"_isUnderline": false,
|
||||||
"_underlineHeight": 2,
|
"_underlineHeight": 2,
|
||||||
"_cacheMode": 0,
|
"_cacheMode": 0,
|
||||||
@@ -9598,7 +9598,7 @@
|
|||||||
"__id__": 465
|
"__id__": 465
|
||||||
},
|
},
|
||||||
"_children": [],
|
"_children": [],
|
||||||
"_active": false,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 467
|
"__id__": 467
|
||||||
@@ -9612,7 +9612,7 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 20,
|
"x": 0,
|
||||||
"y": 0,
|
"y": 0,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
@@ -9653,7 +9653,7 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 50,
|
"width": 100,
|
||||||
"height": 30
|
"height": 30
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
@@ -9748,8 +9748,8 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": -24.726,
|
"x": -30.243,
|
||||||
"y": 2.704,
|
"y": 0,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -9789,8 +9789,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 35,
|
"width": 30,
|
||||||
"height": 35
|
"height": 30
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -9826,7 +9826,7 @@
|
|||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@ec5a5",
|
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@4b5bf",
|
||||||
"__expectedType__": "cc.SpriteFrame"
|
"__expectedType__": "cc.SpriteFrame"
|
||||||
},
|
},
|
||||||
"_type": 0,
|
"_type": 0,
|
||||||
@@ -9842,7 +9842,7 @@
|
|||||||
"_isTrimmedMode": true,
|
"_isTrimmedMode": true,
|
||||||
"_useGrayscale": false,
|
"_useGrayscale": false,
|
||||||
"_atlas": {
|
"_atlas": {
|
||||||
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4",
|
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
|
||||||
"__expectedType__": "cc.SpriteAtlas"
|
"__expectedType__": "cc.SpriteAtlas"
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
@@ -9891,8 +9891,8 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 28,
|
"x": 17.886,
|
||||||
"y": 2.704,
|
"y": 0,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -9944,7 +9944,7 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": -21.5615234375,
|
"x": -18.78076171875,
|
||||||
"y": 1.739,
|
"y": 1.739,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
@@ -10130,7 +10130,7 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 33.8076171875,
|
"width": 28.24609375,
|
||||||
"height": 56.4
|
"height": 56.4
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
@@ -10169,8 +10169,8 @@
|
|||||||
"_string": "12",
|
"_string": "12",
|
||||||
"_horizontalAlign": 1,
|
"_horizontalAlign": 1,
|
||||||
"_verticalAlign": 1,
|
"_verticalAlign": 1,
|
||||||
"_actualFontSize": 25,
|
"_actualFontSize": 20,
|
||||||
"_fontSize": 25,
|
"_fontSize": 20,
|
||||||
"_fontFamily": "Arial",
|
"_fontFamily": "Arial",
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_overflow": 0,
|
"_overflow": 0,
|
||||||
@@ -10179,7 +10179,7 @@
|
|||||||
"_isSystemFontUsed": true,
|
"_isSystemFontUsed": true,
|
||||||
"_spacingX": 0,
|
"_spacingX": 0,
|
||||||
"_isItalic": false,
|
"_isItalic": false,
|
||||||
"_isBold": true,
|
"_isBold": false,
|
||||||
"_isUnderline": false,
|
"_isUnderline": false,
|
||||||
"_underlineHeight": 2,
|
"_underlineHeight": 2,
|
||||||
"_cacheMode": 0,
|
"_cacheMode": 0,
|
||||||
|
|||||||
@@ -269,13 +269,13 @@ export class MissionCardComp extends CCComp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private getMergeRule(): { needCount: number, maxLv: number } {
|
private getMergeRule(): { needCount: number, maxLv: number } {
|
||||||
let needCount = 2;
|
let needCount = 3;
|
||||||
let maxLv = 3;
|
let maxLv = 2; // 兜底值改为2,与 MissionHeroComp 保持一致
|
||||||
ecs.query(ecs.allOf(MissionHeroCompComp)).forEach((entity: ecs.Entity) => {
|
ecs.query(ecs.allOf(MissionHeroCompComp)).forEach((entity: ecs.Entity) => {
|
||||||
const comp = entity.get(MissionHeroCompComp);
|
const comp = entity.get(MissionHeroCompComp);
|
||||||
if (!comp) return;
|
if (!comp) return;
|
||||||
needCount = comp.merge_need_count === 2 ? 2 : 3;
|
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 };
|
return { needCount, maxLv };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user