From 84337897e7076d4c8ba7a21af95324dbd3bcdbbe Mon Sep 17 00:00:00 2001 From: pan Date: Tue, 25 Aug 2026 16:32:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor(talentItem):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=A4=A9=E8=B5=8B=E9=81=93=E5=85=B7=E7=9A=84=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=B8=8EUI=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 调整天赋道具的状态判断逻辑,将阶位未解锁和未加点状态合并为未激活状态 2. 移除整卡透明度遮罩,改为仅显示左上角锁图标 3. 更新锁节点提示文案,明确未激活的两种场景 4. 调整锁、加号、满级角标的位置与资源配置 5. 扩展点击交互范围,支持锁角标点击触发升级 --- .../gui/element/prefab_talent_item.prefab | 1095 ++--------------- assets/script/game/map/TalentItemComp.ts | 16 +- 2 files changed, 77 insertions(+), 1034 deletions(-) diff --git a/assets/resources/gui/element/prefab_talent_item.prefab b/assets/resources/gui/element/prefab_talent_item.prefab index 8604929b..2c828be2 100644 --- a/assets/resources/gui/element/prefab_talent_item.prefab +++ b/assets/resources/gui/element/prefab_talent_item.prefab @@ -37,26 +37,26 @@ "__id__": 131 }, { - "__id__": 181 + "__id__": 137 }, { - "__id__": 187 + "__id__": 143 } ], "_active": true, "_components": [ { - "__id__": 197 + "__id__": 153 }, { - "__id__": 199 + "__id__": 155 }, { - "__id__": 201 + "__id__": 157 } ], "_prefab": { - "__id__": 203 + "__id__": 159 }, "_lpos": { "__type__": "cc.Vec3", @@ -1912,926 +1912,31 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, - { - "__type__": "cc.Node", - "_name": "locked", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 1 - }, - "_children": [ - { - "__id__": 132 - }, - { - "__id__": 170 - } - ], - "_active": true, - "_components": [ - { - "__id__": 176 - }, - { - "__id__": 178 - } - ], - "_prefab": { - "__id__": 180 - }, - "_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": "yellow", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 131 - }, - "_children": [ - { - "__id__": 133 - }, - { - "__id__": 141 - }, - { - "__id__": 149 - } - ], - "_active": true, - "_components": [ - { - "__id__": 163 - }, - { - "__id__": 165 - }, - { - "__id__": 167 - } - ], - "_prefab": { - "__id__": 169 - }, - "_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": "CardFrame03_n_Bg", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 132 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 134 - }, - { - "__id__": 136 - }, - { - "__id__": 138 - } - ], - "_prefab": { - "__id__": 140 - }, - "_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.5, - "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__": 133 - }, - "_enabled": true, - "__prefab": { - "__id__": 135 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 440, - "height": 540 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "5be8Y5xQhIcqiqfRHSUXyi" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 133 - }, - "_enabled": true, - "__prefab": { - "__id__": 137 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 219, - "g": 219, - "b": 219, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@8ed5b", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 1, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": true, - "_atlas": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "310faVhipED5Lh7lfM4nhW" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 133 - }, - "_enabled": true, - "__prefab": { - "__id__": 139 - }, - "_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": 64, - "_originalHeight": 67, - "_alignMode": 2, - "_lockFlags": 0, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "a9Kib45E5Ly4BqLAyJgFqs" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "7eufRQtqJH0Y8Q7oM6jxzB", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "CardFrame03_n_Light", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 132 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 142 - }, - { - "__id__": 144 - }, - { - "__id__": 146 - } - ], - "_prefab": { - "__id__": 148 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 1, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 0.5, - "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__": 141 - }, - "_enabled": true, - "__prefab": { - "__id__": 143 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 432, - "height": 528 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "63icpebARPmZdNwGVUCIiD" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 141 - }, - "_enabled": true, - "__prefab": { - "__id__": 145 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 192, - "g": 192, - "b": 192, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@6c895", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 1, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": true, - "_atlas": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "53mKGd3ZZMPKOo5r6SXHHI" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 141 - }, - "_enabled": true, - "__prefab": { - "__id__": 147 - }, - "_alignFlags": 45, - "_target": null, - "_left": 2, - "_right": 2, - "_top": 2, - "_bottom": 4, - "_horizontalCenter": 0, - "_verticalCenter": 0, - "_isAbsLeft": true, - "_isAbsRight": true, - "_isAbsTop": true, - "_isAbsBottom": true, - "_isAbsHorizontalCenter": true, - "_isAbsVerticalCenter": true, - "_originalWidth": 56, - "_originalHeight": 56, - "_alignMode": 2, - "_lockFlags": 0, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "aeN4BCs8BFn6JGBQDoks3G" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "24mHO9vIVM+aym0IYHM5JA", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.Node", - "_name": "InnerBg", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 132 - }, - "_children": [ - { - "__id__": 150 - } - ], - "_active": true, - "_components": [ - { - "__id__": 158 - }, - { - "__id__": 160 - } - ], - "_prefab": { - "__id__": 162 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 75, - "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": "CardFrame03_n_InnerBg", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 149 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 151 - }, - { - "__id__": 153 - }, - { - "__id__": 155 - } - ], - "_prefab": { - "__id__": 157 - }, - "_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.5, - "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__": 150 - }, - "_enabled": true, - "__prefab": { - "__id__": 152 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 400, - "height": 200 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "7efwATyvxPY7HpQChcjxWf" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 150 - }, - "_enabled": true, - "__prefab": { - "__id__": 154 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 214, - "g": 208, - "b": 208, - "a": 255 - }, - "_spriteFrame": { - "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@e230b", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 1, - "_fillType": 0, - "_sizeMode": 0, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": true, - "_atlas": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "41kw9SQVBKmpbV5y6u5kGF" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 150 - }, - "_enabled": true, - "__prefab": { - "__id__": 156 - }, - "_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": 40, - "_originalHeight": 40, - "_alignMode": 2, - "_lockFlags": 0, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "36SD0VKG1Hv7kFjGnvcOAf" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "89RPBgXm9GJKp1XWS3504D", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 149 - }, - "_enabled": true, - "__prefab": { - "__id__": 159 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 200, - "height": 100 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "d3C2H7ChhPlr18iWhAuLSl" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 149 - }, - "_enabled": true, - "__prefab": { - "__id__": 161 - }, - "_alignFlags": 41, - "_target": null, - "_left": 10, - "_right": 10, - "_top": 10, - "_bottom": 115, - "_horizontalCenter": 0, - "_verticalCenter": 0, - "_isAbsLeft": true, - "_isAbsRight": true, - "_isAbsTop": true, - "_isAbsBottom": true, - "_isAbsHorizontalCenter": true, - "_isAbsVerticalCenter": true, - "_originalWidth": 40, - "_originalHeight": 40, - "_alignMode": 2, - "_lockFlags": 0, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "50PKr8i0NJp5LdefQZlejW" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "44RQ+l7uRCMYmJHreY/8B0", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 132 - }, - "_enabled": true, - "__prefab": { - "__id__": 164 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 220, - "height": 270 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "90eS59g8VFsphYkfjOxOqC" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 132 - }, - "_enabled": true, - "__prefab": { - "__id__": 166 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 168 - }, - "_spriteFrame": null, - "_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": "16E7xoqaVFeITmFL140HoK" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 132 - }, - "_enabled": true, - "__prefab": { - "__id__": 168 - }, - "_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": 228, - "_originalHeight": 293, - "_alignMode": 2, - "_lockFlags": 0, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "45AGWwyMVAD4/jKp5hBptl" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "79SWDtvqBI7rdSoa3dC4Rx", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, { "__type__": "cc.Node", "_name": "Icon_Lock03", "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 131 + "__id__": 1 }, "_children": [], "_active": true, "_components": [ { - "__id__": 171 + "__id__": 132 }, { - "__id__": 173 + "__id__": 134 } ], "_prefab": { - "__id__": 175 + "__id__": 136 }, "_lpos": { "__type__": "cc.Vec3", - "x": 0, - "y": 0, + "x": 73.924, + "y": 103.982, "z": 0 }, "_lrot": { @@ -2843,8 +1948,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 1.5, - "y": 1.5, + "x": 1.1, + "y": 1.1, "z": 1 }, "_mobility": 0, @@ -2863,11 +1968,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 170 + "__id__": 131 }, "_enabled": true, "__prefab": { - "__id__": 172 + "__id__": 133 }, "_contentSize": { "__type__": "cc.Size", @@ -2891,11 +1996,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 170 + "__id__": 131 }, "_enabled": true, "__prefab": { - "__id__": 174 + "__id__": 135 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2922,7 +2027,7 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_useGrayscale": true, + "_useGrayscale": false, "_atlas": null, "_id": "" }, @@ -2943,89 +2048,6 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 131 - }, - "_enabled": true, - "__prefab": { - "__id__": 177 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 220, - "height": 270 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "03bDF6oNhLoLvrNLXtlHMk" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 131 - }, - "_enabled": true, - "__prefab": { - "__id__": 179 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_spriteFrame": null, - "_type": 0, - "_fillType": 0, - "_sizeMode": 1, - "_fillCenter": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_fillStart": 0, - "_fillRange": 0, - "_isTrimmedMode": true, - "_useGrayscale": true, - "_atlas": null, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "4exW/pMVhNO7eORwt60jHu" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "d568jl8ZNHl6fij+8UbiPC", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, { "__type__": "cc.Node", "_name": "plus", @@ -3038,14 +2060,14 @@ "_active": true, "_components": [ { - "__id__": 182 + "__id__": 138 }, { - "__id__": 184 + "__id__": 140 } ], "_prefab": { - "__id__": 186 + "__id__": 142 }, "_lpos": { "__type__": "cc.Vec3", @@ -3082,11 +2104,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 181 + "__id__": 137 }, "_enabled": true, "__prefab": { - "__id__": 183 + "__id__": 139 }, "_contentSize": { "__type__": "cc.Size", @@ -3110,11 +2132,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 181 + "__id__": 137 }, "_enabled": true, "__prefab": { - "__id__": 185 + "__id__": 141 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3172,17 +2194,17 @@ }, "_children": [ { - "__id__": 188 + "__id__": 144 } ], "_active": true, "_components": [ { - "__id__": 194 + "__id__": 150 } ], "_prefab": { - "__id__": 196 + "__id__": 152 }, "_lpos": { "__type__": "cc.Vec3", @@ -3219,20 +2241,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 187 + "__id__": 143 }, "_children": [], "_active": true, "_components": [ { - "__id__": 189 + "__id__": 145 }, { - "__id__": 191 + "__id__": 147 } ], "_prefab": { - "__id__": 193 + "__id__": 149 }, "_lpos": { "__type__": "cc.Vec3", @@ -3269,11 +2291,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 188 + "__id__": 144 }, "_enabled": true, "__prefab": { - "__id__": 190 + "__id__": 146 }, "_contentSize": { "__type__": "cc.Size", @@ -3297,11 +2319,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 188 + "__id__": 144 }, "_enabled": true, "__prefab": { - "__id__": 192 + "__id__": 148 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3378,11 +2400,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 187 + "__id__": 143 }, "_enabled": true, "__prefab": { - "__id__": 195 + "__id__": 151 }, "_contentSize": { "__type__": "cc.Size", @@ -3423,7 +2445,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 198 + "__id__": 154 }, "_contentSize": { "__type__": "cc.Size", @@ -3451,7 +2473,7 @@ }, "_enabled": false, "__prefab": { - "__id__": 200 + "__id__": 156 }, "_alignFlags": 40, "_target": null, @@ -3487,7 +2509,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 202 + "__id__": 158 }, "lbl_name": { "__id__": 116 @@ -3503,10 +2525,10 @@ }, "bg": null, "node_plus": { - "__id__": 181 + "__id__": 137 }, "node_max": { - "__id__": 187 + "__id__": 143 }, "node_lock": { "__id__": 131 @@ -3529,7 +2551,10 @@ "instance": null, "targetOverrides": [ { - "__id__": 204 + "__id__": 160 + }, + { + "__id__": 162 } ], "nestedPrefabInstanceRoots": [ @@ -3549,7 +2574,29 @@ "__id__": 2 }, "targetInfo": { - "__id__": 205 + "__id__": 161 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "1fQvT1A5hItJZd6AwSBLLo" + ] + }, + { + "__type__": "cc.TargetOverrideInfo", + "source": { + "__id__": 157 + }, + "sourceInfo": null, + "propertyPath": [ + "bg" + ], + "target": { + "__id__": 2 + }, + "targetInfo": { + "__id__": 163 } }, { diff --git a/assets/script/game/map/TalentItemComp.ts b/assets/script/game/map/TalentItemComp.ts index 88adbffa..a5318789 100644 --- a/assets/script/game/map/TalentItemComp.ts +++ b/assets/script/game/map/TalentItemComp.ts @@ -5,7 +5,7 @@ * 职责: * 1. 接收 TalentsComp 下发的天赋配置 + 当前等级 + 阶位解锁态,渲染迷你点选卡。 * 2. 卡面自包含:图标 / 名称 / 当前已生效数值(Lv0 显示每级数值引导)/ 右下「当前/满级」角标。 - * 3. 状态机:可升级(右上 + 徽标,绿光呼吸)/ 满级(MAX 金角标)/ 阶未解锁(半透明 + 锁)。 + * 3. 状态机:可升级(右上 + 徽标)/ 满级(MAX 金角标)/ 未激活(左上锁角标,点击锁/卡体可升级激活)。 * 4. 点击回调上抛(含 + 徽标与卡体),升级校验与 toast 统一由 TalentsComp 处理(单一决策点)。 * * 依赖: @@ -13,7 +13,7 @@ * - CardBgComp —— 阶位品质底框(Ⅰ蓝 / Ⅱ紫 / Ⅲ金) * - smc.uiconsAtlas —— 图标解析(缺省回退资源目录) */ -import { _decorator, Label, Node, NodeEventType, Sprite, SpriteFrame, UIOpacity } from "cc"; +import { _decorator, Label, Node, NodeEventType, Sprite, SpriteFrame } from "cc"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { TalentConfig, TalentTier, getTalentDisplayText } from "../common/config/TalentSet"; @@ -56,7 +56,7 @@ export class TalentItemComp extends CCComp { @property({ type: Node, tooltip: "MAX 满级角标" }) node_max: Node = null!; - @property({ type: Node, tooltip: "阶位未解锁遮罩/锁图标" }) + @property({ type: Node, tooltip: "未激活锁遮罩/锁图标(未加点或阶位未解锁)" }) node_lock: Node = null!; /** 点击回调(卡体与 + 徽标同源上抛),由父级统一校验升级 */ @@ -104,18 +104,14 @@ export class TalentItemComp extends CCComp { if (frame) this.icon.spriteFrame = frame; } - // 状态徽标:满级 MAX / 可升级 + / 阶位锁定 🔒 + // 状态徽标:满级 MAX / 可升级 + / 未激活锁角标(未加点或阶位未解锁,置于左上角) const maxed = lv >= cfg.max_lv; if (this.node_max) this.node_max.active = maxed; if (this.node_plus) this.node_plus.active = !maxed && tierUnlocked && canUp; - if (this.node_lock) this.node_lock.active = !tierUnlocked; - - // 阶位锁定整卡压暗(UIOpacity:Cocos 3.x 节点透明度组件) - const uo = this.node.getComponent(UIOpacity) ?? this.node.addComponent(UIOpacity); - uo.opacity = tierUnlocked ? 255 : 110; + if (this.node_lock) this.node_lock.active = lv <= 0 || !tierUnlocked; } - /** 卡体/+ 徽标点击:上抛 uuid,升级校验与提示由 TalentsComp 统一处理 */ + /** 卡体/+ 徽标/锁角标点击:触摸事件冒泡至卡体统一上抛 uuid,升级校验与提示由 TalentsComp 处理 */ private onTap(): void { this.onTalentTap?.(this.curUuid); }