feat(card): 完善卡牌图标显示与锁定功能

- 为英雄卡牌添加动画图标显示,根据配置加载对应动画
- 修复锁定按钮显示逻辑,现在正确显示锁定/解锁状态
- 为技能、buff、英雄等卡牌类型添加图标解析功能
- 更新卡牌预制体,调整图标尺寸和锁定图标
- 删除未使用的动画资源文件
- 优化资源图集配置,调整精灵帧位置
This commit is contained in:
walkpan
2026-03-14 21:39:27 +08:00
parent c7248fe32a
commit 7d0dc04d01
14 changed files with 2027 additions and 5936 deletions

View File

@@ -41,19 +41,22 @@
},
{
"__id__": 128
},
{
"__id__": 134
}
],
"_active": true,
"_components": [
{
"__id__": 146
"__id__": 152
},
{
"__id__": 148
"__id__": 154
}
],
"_prefab": {
"__id__": 150
"__id__": 156
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1488,7 +1491,7 @@
"__id__": 56
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 64
@@ -2833,8 +2836,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"x": 0.6,
"y": 0.5,
"z": 1
},
"_mobility": 0,
@@ -2861,8 +2864,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 116
"width": 71,
"height": 93
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -2898,7 +2901,7 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@9bf16",
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@cebb2",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
@@ -2912,7 +2915,7 @@
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_useGrayscale": true,
"_atlas": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4",
"__expectedType__": "cc.SpriteAtlas"
@@ -2936,6 +2939,145 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "unlock",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 129
},
{
"__id__": 131
}
],
"_prefab": {
"__id__": 133
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 107.855,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.6,
"y": 0.5,
"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__": 128
},
"_enabled": true,
"__prefab": {
"__id__": 130
},
"_contentSize": {
"__type__": "cc.Size",
"width": 71,
"height": 93
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "27e4xvL1xFE5W3UEjN+P2U"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 128
},
"_enabled": true,
"__prefab": {
"__id__": 132
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@cebb2",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a2AJSrmfZIGIP3eBo5ENul"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c6hfaCqT5C67MK1fH43cAk",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "coin",
@@ -2946,23 +3088,23 @@
},
"_children": [
{
"__id__": 129
"__id__": 135
},
{
"__id__": 135
"__id__": 141
}
],
"_active": true,
"_components": [
{
"__id__": 141
"__id__": 147
},
{
"__id__": 143
"__id__": 149
}
],
"_prefab": {
"__id__": 145
"__id__": 151
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -2999,147 +3141,8 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 128
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 130
},
{
"__id__": 132
}
],
"_prefab": {
"__id__": 134
},
"_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__": 129
},
"_enabled": true,
"__prefab": {
"__id__": 131
},
"_contentSize": {
"__type__": "cc.Size",
"width": 35,
"height": 35
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "38DeJBYvFJsJYX9545ctt3"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 129
},
"_enabled": true,
"__prefab": {
"__id__": 133
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@ec5a5",
"__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": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "95g2LbLWtFJLFLnPCex4xq"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "d6lvh87QJBqrQKgDnhSWth",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "num",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 128
},
"_children": [],
"_active": true,
"_components": [
@@ -3194,6 +3197,145 @@
"__prefab": {
"__id__": 137
},
"_contentSize": {
"__type__": "cc.Size",
"width": 35,
"height": 35
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "38DeJBYvFJsJYX9545ctt3"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 135
},
"_enabled": true,
"__prefab": {
"__id__": 139
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@ec5a5",
"__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": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "95g2LbLWtFJLFLnPCex4xq"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "d6lvh87QJBqrQKgDnhSWth",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "num",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 134
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 142
},
{
"__id__": 144
}
],
"_prefab": {
"__id__": 146
},
"_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__": 141
},
"_enabled": true,
"__prefab": {
"__id__": 143
},
"_contentSize": {
"__type__": "cc.Size",
"width": 17.90380859375,
@@ -3216,11 +3358,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 135
"__id__": 141
},
"_enabled": true,
"__prefab": {
"__id__": 139
"__id__": 145
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -3297,11 +3439,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 128
"__id__": 134
},
"_enabled": true,
"__prefab": {
"__id__": 142
"__id__": 148
},
"_contentSize": {
"__type__": "cc.Size",
@@ -3325,11 +3467,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 128
"__id__": 134
},
"_enabled": true,
"__prefab": {
"__id__": 144
"__id__": 150
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -3384,7 +3526,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 147
"__id__": 153
},
"_contentSize": {
"__type__": "cc.Size",
@@ -3412,12 +3554,14 @@
},
"_enabled": true,
"__prefab": {
"__id__": 149
"__id__": 155
},
"Lock": {
"__id__": 122
},
"unLock": null,
"unLock": {
"__id__": 128
},
"ap_node": {
"__id__": 89
},
@@ -3431,7 +3575,7 @@
"__id__": 63
},
"cost_node": {
"__id__": 135
"__id__": 141
},
"_id": ""
},