feat(map): 重构英雄图鉴页面,实现完整的英雄卡片展示与详情功能
1. 重写HerosListComp组件,实现卡片动态生成、选中高亮、详情更新逻辑 2. 完善CardLiteComp组件,支持英雄卡渲染、点击交互与动画加载 3. 清理冗余的预制体绑定代码,修复异步加载竞态问题 4. 添加详细的日志与注释,优化可维护性
This commit is contained in:
@@ -31,17 +31,17 @@
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 375
|
||||
"__id__": 343
|
||||
},
|
||||
{
|
||||
"__id__": 377
|
||||
"__id__": 345
|
||||
},
|
||||
{
|
||||
"__id__": 379
|
||||
"__id__": 347
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 381
|
||||
"__id__": 349
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -6536,14 +6536,14 @@
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 370
|
||||
"__id__": 338
|
||||
},
|
||||
{
|
||||
"__id__": 372
|
||||
"__id__": 340
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 374
|
||||
"__id__": 342
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -6593,20 +6593,20 @@
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 363
|
||||
"__id__": 331
|
||||
},
|
||||
{
|
||||
"__id__": 365
|
||||
"__id__": 333
|
||||
},
|
||||
{
|
||||
"__id__": 310
|
||||
},
|
||||
{
|
||||
"__id__": 367
|
||||
"__id__": 335
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 369
|
||||
"__id__": 337
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -6666,7 +6666,7 @@
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 362
|
||||
"__id__": 330
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -7010,34 +7010,21 @@
|
||||
"_parent": {
|
||||
"__id__": 313
|
||||
},
|
||||
"_children": [
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 323
|
||||
},
|
||||
{
|
||||
"__id__": 331
|
||||
"__id__": 325
|
||||
},
|
||||
{
|
||||
"__id__": 339
|
||||
},
|
||||
{
|
||||
"__id__": 347
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 355
|
||||
},
|
||||
{
|
||||
"__id__": 357
|
||||
},
|
||||
{
|
||||
"__id__": 359
|
||||
"__id__": 327
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 361
|
||||
"__id__": 329
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -7273,454 +7260,6 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 312
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 324
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 323
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "b8313fa7-28e5-4d92-9d64-a1e0ecb040a8",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"fileId": "24rlgXRJ9AHLGpMW+aYyEx",
|
||||
"instance": {
|
||||
"__id__": 325
|
||||
},
|
||||
"targetOverrides": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInstance",
|
||||
"fileId": "02nuyp0OlFMrhOJh7vihYl",
|
||||
"prefabRootNode": {
|
||||
"__id__": 1
|
||||
},
|
||||
"mountedChildren": [],
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 326
|
||||
},
|
||||
{
|
||||
"__id__": 328
|
||||
},
|
||||
{
|
||||
"__id__": 329
|
||||
},
|
||||
{
|
||||
"__id__": 330
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 327
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
],
|
||||
"value": "cardlite"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"24rlgXRJ9AHLGpMW+aYyEx"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 327
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -260,
|
||||
"y": -120,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 327
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 327
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 312
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 332
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 331
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "b8313fa7-28e5-4d92-9d64-a1e0ecb040a8",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"fileId": "24rlgXRJ9AHLGpMW+aYyEx",
|
||||
"instance": {
|
||||
"__id__": 333
|
||||
},
|
||||
"targetOverrides": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInstance",
|
||||
"fileId": "82qCKYiEZLkJaOe4tyrOBe",
|
||||
"prefabRootNode": {
|
||||
"__id__": 1
|
||||
},
|
||||
"mountedChildren": [],
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 334
|
||||
},
|
||||
{
|
||||
"__id__": 336
|
||||
},
|
||||
{
|
||||
"__id__": 337
|
||||
},
|
||||
{
|
||||
"__id__": 338
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 335
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
],
|
||||
"value": "cardlite"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"24rlgXRJ9AHLGpMW+aYyEx"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 335
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -90,
|
||||
"y": -120,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 335
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 335
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 312
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 340
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 339
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "b8313fa7-28e5-4d92-9d64-a1e0ecb040a8",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"fileId": "24rlgXRJ9AHLGpMW+aYyEx",
|
||||
"instance": {
|
||||
"__id__": 341
|
||||
},
|
||||
"targetOverrides": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInstance",
|
||||
"fileId": "623HfkMl9GcIckg94/cCZ3",
|
||||
"prefabRootNode": {
|
||||
"__id__": 1
|
||||
},
|
||||
"mountedChildren": [],
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 342
|
||||
},
|
||||
{
|
||||
"__id__": 344
|
||||
},
|
||||
{
|
||||
"__id__": 345
|
||||
},
|
||||
{
|
||||
"__id__": 346
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 343
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
],
|
||||
"value": "cardlite"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"24rlgXRJ9AHLGpMW+aYyEx"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 343
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 80,
|
||||
"y": -120,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 343
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 343
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 312
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 348
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 347
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "b8313fa7-28e5-4d92-9d64-a1e0ecb040a8",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"fileId": "24rlgXRJ9AHLGpMW+aYyEx",
|
||||
"instance": {
|
||||
"__id__": 349
|
||||
},
|
||||
"targetOverrides": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInstance",
|
||||
"fileId": "164auV8KBJbKiVegqqYH2a",
|
||||
"prefabRootNode": {
|
||||
"__id__": 1
|
||||
},
|
||||
"mountedChildren": [],
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 350
|
||||
},
|
||||
{
|
||||
"__id__": 352
|
||||
},
|
||||
{
|
||||
"__id__": 353
|
||||
},
|
||||
{
|
||||
"__id__": 354
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 351
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
],
|
||||
"value": "cardlite"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"24rlgXRJ9AHLGpMW+aYyEx"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 351
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 250,
|
||||
"y": -120,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 351
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 351
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
@@ -7731,7 +7270,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 356
|
||||
"__id__": 324
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -7759,7 +7298,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 358
|
||||
"__id__": 326
|
||||
},
|
||||
"_alignFlags": 41,
|
||||
"_target": null,
|
||||
@@ -7795,7 +7334,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 360
|
||||
"__id__": 328
|
||||
},
|
||||
"_resizeMode": 0,
|
||||
"_layoutType": 3,
|
||||
@@ -7859,7 +7398,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 364
|
||||
"__id__": 332
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -7887,7 +7426,7 @@
|
||||
},
|
||||
"_enabled": false,
|
||||
"__prefab": {
|
||||
"__id__": 366
|
||||
"__id__": 334
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
@@ -7932,7 +7471,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 368
|
||||
"__id__": 336
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
@@ -7981,7 +7520,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 371
|
||||
"__id__": 339
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -8009,7 +7548,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 373
|
||||
"__id__": 341
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
@@ -8058,7 +7597,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 376
|
||||
"__id__": 344
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -8086,7 +7625,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 378
|
||||
"__id__": 346
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
@@ -8122,7 +7661,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 380
|
||||
"__id__": 348
|
||||
},
|
||||
"hero_icon": {
|
||||
"__id__": 95
|
||||
@@ -8149,6 +7688,10 @@
|
||||
"__uuid__": "b8313fa7-28e5-4d92-9d64-a1e0ecb040a8",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"lv_node": {
|
||||
"__id__": 130
|
||||
},
|
||||
"type_node": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
@@ -8167,18 +7710,6 @@
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": [
|
||||
{
|
||||
"__id__": 347
|
||||
},
|
||||
{
|
||||
"__id__": 339
|
||||
},
|
||||
{
|
||||
"__id__": 331
|
||||
},
|
||||
{
|
||||
"__id__": 323
|
||||
},
|
||||
{
|
||||
"__id__": 130
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user