feat(skillBox): add hero level unlock prompt for locked skills

1. 新增unlock_lv字段存储技能解锁所需英雄等级,与技能等级解耦
2. 优化锁定状态下的UI展示:优先显示等级解锁提示,回退使用技能等级
3. 重构技能图标生成逻辑,传递解锁等级参数
4. 更新天赋道具预制体,适配新的解锁提示UI展示逻辑
This commit is contained in:
panFD
2026-09-08 20:04:27 +08:00
parent 056feba945
commit 07f1646013
3 changed files with 500 additions and 179 deletions

View File

@@ -37,23 +37,23 @@
"__id__": 64
},
{
"__id__": 70
"__id__": 80
}
],
"_active": true,
"_components": [
{
"__id__": 86
"__id__": 100
},
{
"__id__": 88
"__id__": 102
},
{
"__id__": 90
"__id__": 104
}
],
"_prefab": {
"__id__": 92
"__id__": 106
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1534,142 +1534,6 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Icon_Lock03",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 65
},
{
"__id__": 67
}
],
"_prefab": {
"__id__": 69
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 73.924,
"y": 103.982,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.1,
"y": 1.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__": 64
},
"_enabled": true,
"__prefab": {
"__id__": 66
},
"_contentSize": {
"__type__": "cc.Size",
"width": 71,
"height": 93
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "96CNC5WcxHCLj/0rraN4ac"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 64
},
"_enabled": true,
"__prefab": {
"__id__": 68
},
"_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": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e2OtALK6NGW4VjKFngrgE6"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "8dVVuSmoNM8LK80ldyL0K7",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "max",
@@ -1680,20 +1544,20 @@
},
"_children": [
{
"__id__": 71
"__id__": 65
},
{
"__id__": 77
"__id__": 71
}
],
"_active": true,
"_components": [
{
"__id__": 83
"__id__": 77
}
],
"_prefab": {
"__id__": 85
"__id__": 79
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1730,20 +1594,20 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 70
"__id__": 64
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 72
"__id__": 66
},
{
"__id__": 74
"__id__": 68
}
],
"_prefab": {
"__id__": 76
"__id__": 70
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1780,11 +1644,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 71
"__id__": 65
},
"_enabled": true,
"__prefab": {
"__id__": 73
"__id__": 67
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1808,11 +1672,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 71
"__id__": 65
},
"_enabled": true,
"__prefab": {
"__id__": 75
"__id__": 69
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -1866,20 +1730,20 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 70
"__id__": 64
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 78
"__id__": 72
},
{
"__id__": 80
"__id__": 74
}
],
"_prefab": {
"__id__": 82
"__id__": 76
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1916,11 +1780,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 77
"__id__": 71
},
"_enabled": true,
"__prefab": {
"__id__": 79
"__id__": 73
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1944,11 +1808,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 77
"__id__": 71
},
"_enabled": true,
"__prefab": {
"__id__": 81
"__id__": 75
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -2025,11 +1889,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 70
"__id__": 64
},
"_enabled": true,
"__prefab": {
"__id__": 84
"__id__": 78
},
"_contentSize": {
"__type__": "cc.Size",
@@ -2060,6 +1924,451 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "noactive",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 81
},
{
"__id__": 89
}
],
"_active": true,
"_components": [
{
"__id__": 95
},
{
"__id__": 97
}
],
"_prefab": {
"__id__": 99
},
"_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.Node",
"_name": "blue",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 80
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 82
},
{
"__id__": 84
},
{
"__id__": 86
}
],
"_prefab": {
"__id__": 88
},
"_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.4,
"y": 1.4,
"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__": 81
},
"_enabled": true,
"__prefab": {
"__id__": 83
},
"_contentSize": {
"__type__": "cc.Size",
"width": 154,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "02tqPPrY1Mx4HziZh79O+F"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 81
},
"_enabled": true,
"__prefab": {
"__id__": 85
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 170,
"g": 170,
"b": 170,
"a": 109
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@c7ff0",
"__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": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a6VaY56hpLGYTqYxL4G8G4"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 81
},
"_enabled": false,
"__prefab": {
"__id__": 87
},
"_alignFlags": 45,
"_target": null,
"_left": 33,
"_right": 33,
"_top": 96.5,
"_bottom": 96.5,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 154,
"_originalHeight": 77,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "24wCrMoqJLHY7n4+pMDcEH"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "7aU9V35MxJiYyfCI9NBo6N",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Icon_Lock03",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 80
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 90
},
{
"__id__": 92
}
],
"_prefab": {
"__id__": 94
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -102.773,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.1,
"y": 1.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__": 89
},
"_enabled": true,
"__prefab": {
"__id__": 91
},
"_contentSize": {
"__type__": "cc.Size",
"width": 71,
"height": 93
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "96CNC5WcxHCLj/0rraN4ac"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 89
},
"_enabled": true,
"__prefab": {
"__id__": 93
},
"_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": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e2OtALK6NGW4VjKFngrgE6"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "8dVVuSmoNM8LK80ldyL0K7",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 80
},
"_enabled": true,
"__prefab": {
"__id__": 96
},
"_contentSize": {
"__type__": "cc.Size",
"width": 220,
"height": 270
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "fbVeBmzjlD0rSwQ/9qQKpZ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 80
},
"_enabled": true,
"__prefab": {
"__id__": 98
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20viM7np1ERq6mlLUuvKyu"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "f9kgfFlvZJrrGoujOuKQJ1",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
@@ -2070,7 +2379,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 87
"__id__": 101
},
"_contentSize": {
"__type__": "cc.Size",
@@ -2098,7 +2407,7 @@
},
"_enabled": false,
"__prefab": {
"__id__": 89
"__id__": 103
},
"_alignFlags": 40,
"_target": null,
@@ -2134,7 +2443,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 91
"__id__": 105
},
"lbl_name": {
"__id__": 49
@@ -2152,9 +2461,11 @@
"__id__": 2
},
"node_max": {
"__id__": 70
"__id__": 64
},
"node_lock": {
"__id__": 80
},
"node_lock": null,
"_id": ""
},
{
@@ -2173,7 +2484,7 @@
"instance": null,
"targetOverrides": [
{
"__id__": 93
"__id__": 107
}
]
},
@@ -2186,7 +2497,7 @@
],
"target": null,
"targetInfo": {
"__id__": 94
"__id__": 108
}
},
{