refactor(missionCard): 重构卡牌池刷新逻辑,改为整池刷新

1.  修改SCardComp的注释,将补卡逻辑改为整池刷新说明
2.  重构MissionCardComp的onCardUsed回调,替换单张补卡为整池刷新
3.  删除buildSingleHeroCard和buildSingleSkillCard两个单张补卡方法
4.  调整注释说明,新增特殊刷新避免重复触发的逻辑
This commit is contained in:
pan
2026-07-21 17:01:35 +08:00
parent fb299f6328
commit db3b5f3649
3 changed files with 329 additions and 107 deletions

View File

@@ -37,11 +37,11 @@
"_active": true,
"_components": [
{
"__id__": 98
"__id__": 110
}
],
"_prefab": {
"__id__": 100
"__id__": 112
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1805,23 +1805,29 @@
},
{
"__id__": 87
},
{
"__id__": 93
},
{
"__id__": 99
}
],
"_active": true,
"_components": [
{
"__id__": 93
"__id__": 105
},
{
"__id__": 95
"__id__": 107
}
],
"_prefab": {
"__id__": 97
"__id__": 109
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -26.182,
"x": -22.948,
"y": -0.337,
"z": 0
},
@@ -1885,7 +1891,7 @@
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.2,
"y": 0.14,
"y": 0.2,
"z": 1
},
"_mobility": 0,
@@ -1913,7 +1919,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 100
"height": 85
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1943,13 +1949,13 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 253,
"g": 213,
"b": 0,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@79d6f",
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@b4af4",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
@@ -1989,14 +1995,14 @@
},
{
"__type__": "cc.Node",
"_name": "Label",
"_name": "Slider_Level_02_Bg",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 80
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 88
@@ -2010,8 +2016,280 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -0.103,
"y": -0.601,
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.6,
"y": 0.6,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 87
},
"_enabled": true,
"__prefab": {
"__id__": 89
},
"_contentSize": {
"__type__": "cc.Size",
"width": 20,
"height": 20
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c8MjBtG2ZAeJMgaljbWriK"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 87
},
"_enabled": true,
"__prefab": {
"__id__": 91
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@46c83",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d6anUnkoJCNoTLRDU0POvf"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "b5ndU4FTRH/r1NQ9j22a6H",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Slider_Level_03_InnerBorder1",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 80
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 94
},
{
"__id__": 96
}
],
"_prefab": {
"__id__": 98
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.6,
"y": 0.6,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 93
},
"_enabled": true,
"__prefab": {
"__id__": 95
},
"_contentSize": {
"__type__": "cc.Size",
"width": 23,
"height": 24
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "93/XbJIIRDBJl2pf7NOTi2"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 93
},
"_enabled": true,
"__prefab": {
"__id__": 97
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@95588",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c2U0QyM1hN9L9LRmqrayYY"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "66M2yZHdhHA4Ogo8TVzoR9",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 80
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 100
},
{
"__id__": 102
}
],
"_prefab": {
"__id__": 104
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0.433,
"y": 2.048,
"z": 0
},
"_lrot": {
@@ -2043,16 +2321,16 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 87
"__id__": 99
},
"_enabled": true,
"__prefab": {
"__id__": 89
"__id__": 101
},
"_contentSize": {
"__type__": "cc.Size",
"width": 7.29,
"height": 40
"width": 9.57,
"height": 25
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -2071,11 +2349,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 87
"__id__": 99
},
"_enabled": true,
"__prefab": {
"__id__": 91
"__id__": 103
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -2087,26 +2365,26 @@
"b": 255,
"a": 255
},
"_string": "1",
"_string": "0",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 25,
"_fontSize": 25,
"_actualFontSize": 13,
"_fontSize": 13,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_lineHeight": 25,
"_overflow": 0,
"_enableWrapText": true,
"_font": {
"__uuid__": "eca7fc51-87d0-4bb0-89e1-aa9c39411bc6",
"__uuid__": "dd574056-40e9-4545-8eec-eea63d489818",
"__expectedType__": "cc.BitmapFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_isItalic": false,
"_isBold": true,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_cacheMode": 1,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
@@ -2115,7 +2393,7 @@
"b": 0,
"a": 255
},
"_outlineWidth": 1,
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
@@ -2159,12 +2437,12 @@
},
"_enabled": true,
"__prefab": {
"__id__": 94
"__id__": 106
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 13
"width": 20,
"height": 20
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -2187,7 +2465,7 @@
},
"_enabled": false,
"__prefab": {
"__id__": 96
"__id__": 108
},
"_resizeMode": 1,
"_layoutType": 1,
@@ -2238,7 +2516,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 99
"__id__": 111
},
"_contentSize": {
"__type__": "cc.Size",