refactor(heroList): 替换卡牌选中高亮方式为显隐标记
1. 重构英雄列表卡牌选中逻辑,移除缩放高亮,改用active子节点显隐标记选中状态 2. 重构CardLiteComp,新增setSelected方法统一处理选中态 3. 调整卡牌预制体尺寸与布局,新增选中标记节点 4. 优化英雄图标加载逻辑,改为静态首帧展示而非播放动画 5. 调整图集边框配置与精灵帧引用
This commit is contained in:
@@ -29,19 +29,22 @@
|
||||
},
|
||||
{
|
||||
"__id__": 223
|
||||
},
|
||||
{
|
||||
"__id__": 229
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 229
|
||||
"__id__": 237
|
||||
},
|
||||
{
|
||||
"__id__": 231
|
||||
"__id__": 239
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 233
|
||||
"__id__": 241
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -294,8 +297,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 189.4
|
||||
"width": 120,
|
||||
"height": 150
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -314,8 +317,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 284,
|
||||
"height": 362.8
|
||||
"width": 224,
|
||||
"height": 284
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -334,8 +337,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 292,
|
||||
"height": 370.8
|
||||
"width": 232,
|
||||
"height": 292
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -354,8 +357,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 300,
|
||||
"height": 378.8
|
||||
"width": 240,
|
||||
"height": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -374,8 +377,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -66.75,
|
||||
"y": 88.45,
|
||||
"x": -51.75,
|
||||
"y": 68.75,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
@@ -395,7 +398,7 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 292,
|
||||
"width": 232,
|
||||
"height": 44
|
||||
}
|
||||
},
|
||||
@@ -709,8 +712,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 189.4
|
||||
"width": 120,
|
||||
"height": 150
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -729,8 +732,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 284,
|
||||
"height": 362.8
|
||||
"width": 224,
|
||||
"height": 284
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -749,8 +752,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 292,
|
||||
"height": 370.8
|
||||
"width": 232,
|
||||
"height": 292
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -769,8 +772,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 300,
|
||||
"height": 378.8
|
||||
"width": 240,
|
||||
"height": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -789,8 +792,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -66.75,
|
||||
"y": 88.45,
|
||||
"x": -51.75,
|
||||
"y": 68.75,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
@@ -804,7 +807,7 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 292,
|
||||
"width": 232,
|
||||
"height": 44
|
||||
}
|
||||
},
|
||||
@@ -1118,8 +1121,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 189.4
|
||||
"width": 120,
|
||||
"height": 150
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1138,8 +1141,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 284,
|
||||
"height": 362.8
|
||||
"width": 224,
|
||||
"height": 284
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1158,8 +1161,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 292,
|
||||
"height": 370.8
|
||||
"width": 232,
|
||||
"height": 292
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1178,8 +1181,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 300,
|
||||
"height": 378.8
|
||||
"width": 240,
|
||||
"height": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1198,8 +1201,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -66.75,
|
||||
"y": 88.45,
|
||||
"x": -51.75,
|
||||
"y": 68.75,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
@@ -1213,7 +1216,7 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 292,
|
||||
"width": 232,
|
||||
"height": 44
|
||||
}
|
||||
},
|
||||
@@ -1527,8 +1530,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 189.4
|
||||
"width": 120,
|
||||
"height": 150
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1547,8 +1550,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 284,
|
||||
"height": 362.8
|
||||
"width": 224,
|
||||
"height": 284
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1567,8 +1570,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 292,
|
||||
"height": 370.8
|
||||
"width": 232,
|
||||
"height": 292
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1587,8 +1590,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 300,
|
||||
"height": 378.8
|
||||
"width": 240,
|
||||
"height": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1607,8 +1610,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -66.75,
|
||||
"y": 88.45,
|
||||
"x": -51.75,
|
||||
"y": 68.75,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
@@ -1622,7 +1625,7 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 292,
|
||||
"width": 232,
|
||||
"height": 44
|
||||
}
|
||||
},
|
||||
@@ -1936,8 +1939,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 189.4
|
||||
"width": 120,
|
||||
"height": 150
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1956,8 +1959,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 284,
|
||||
"height": 362.8
|
||||
"width": 224,
|
||||
"height": 284
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1976,8 +1979,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 292,
|
||||
"height": 370.8
|
||||
"width": 232,
|
||||
"height": 292
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1996,8 +1999,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 300,
|
||||
"height": 378.8
|
||||
"width": 240,
|
||||
"height": 300
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -2016,8 +2019,8 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -66.75,
|
||||
"y": 88.45,
|
||||
"x": -51.75,
|
||||
"y": 68.75,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
@@ -2031,7 +2034,7 @@
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 292,
|
||||
"width": 232,
|
||||
"height": 44
|
||||
}
|
||||
},
|
||||
@@ -2464,8 +2467,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 189.4
|
||||
"width": 120,
|
||||
"height": 150
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -2561,7 +2564,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 8.873000000000005,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -2611,7 +2614,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"y": 9.319,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -2740,8 +2743,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 160
|
||||
"width": 110,
|
||||
"height": 140
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -2788,12 +2791,12 @@
|
||||
"__prefab": {
|
||||
"__id__": 211
|
||||
},
|
||||
"_alignFlags": 41,
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 5.827000000000003,
|
||||
"_bottom": 0,
|
||||
"_left": 5,
|
||||
"_right": 5,
|
||||
"_top": 5,
|
||||
"_bottom": 5,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
@@ -2803,7 +2806,7 @@
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 200,
|
||||
"_originalHeight": 0,
|
||||
"_originalHeight": 160,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
@@ -2900,7 +2903,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 72.844,
|
||||
"y": 56.345,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -2979,8 +2982,8 @@
|
||||
"_string": "名称",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 25,
|
||||
"_fontSize": 25,
|
||||
"_actualFontSize": 20,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 30,
|
||||
"_overflow": 2,
|
||||
@@ -3001,7 +3004,7 @@
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 3,
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
@@ -3038,7 +3041,7 @@
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 6.856000000000002,
|
||||
"_top": 3.654999999999994,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
@@ -3095,7 +3098,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -75.451,
|
||||
"y": -59.128,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -3135,7 +3138,7 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 52.1689453125,
|
||||
"width": 42.53515625,
|
||||
"height": 54.4
|
||||
},
|
||||
"_anchorPoint": {
|
||||
@@ -3174,8 +3177,8 @@
|
||||
"_string": "Lv.1",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 25,
|
||||
"_fontSize": 25,
|
||||
"_actualFontSize": 20,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 40,
|
||||
"_overflow": 0,
|
||||
@@ -3230,6 +3233,184 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "active",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 230
|
||||
},
|
||||
{
|
||||
"__id__": 232
|
||||
},
|
||||
{
|
||||
"__id__": 234
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 236
|
||||
},
|
||||
"_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": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 229
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 231
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 138,
|
||||
"height": 168
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "6bRkXvBFBBQJTXKJ+lHn7F"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 229
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 233
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"a": 187
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "abc35b6e-b052-4835-a3a3-cb85abd47f4d@b2a38",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": {
|
||||
"__uuid__": "abc35b6e-b052-4835-a3a3-cb85abd47f4d",
|
||||
"__expectedType__": "cc.SpriteAtlas"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "0aBT/Ljh5P+KFlQ7DgfNYD"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 229
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 235
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": -9,
|
||||
"_right": -9,
|
||||
"_top": -9,
|
||||
"_bottom": -9,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 108,
|
||||
"_originalHeight": 108,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "52xFvF0H5D/b9QPel8K40f"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "75YtWkfHpD8KJXX18oHnIP",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
@@ -3240,12 +3421,12 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 230
|
||||
"__id__": 238
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 189.4
|
||||
"width": 120,
|
||||
"height": 150
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -3268,7 +3449,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 232
|
||||
"__id__": 240
|
||||
},
|
||||
"name_node": {
|
||||
"__id__": 215
|
||||
@@ -3281,7 +3462,9 @@
|
||||
"BG_node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"lvl_node": null,
|
||||
"lvl_node": {
|
||||
"__id__": 226
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user