From b43a30a192b6a6cf36f213a4412d26678f38d518 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 27 Jan 2026 16:55:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BA=E5=A5=96=E5=8A=B1=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E6=B7=BB=E5=8A=A0=E7=B1=BB=E5=9E=8B=E6=A0=87=E8=AF=86?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 MissionGetsComp 中添加根据 CardKind 显示不同类型标识的逻辑 - 修改 get.prefab 预制体,增加 Atk、Atked、Buff 等类型标识节点 - 默认隐藏 card.prefab 中的两个子节点以优化初始显示状态 --- assets/resources/game/gui/get.prefab | 1019 +++++++++++++++++++-- assets/resources/gui/uis/bgs/card.prefab | 4 +- assets/script/game/map/MissionGetsComp.ts | 44 + 3 files changed, 1008 insertions(+), 59 deletions(-) diff --git a/assets/resources/game/gui/get.prefab b/assets/resources/game/gui/get.prefab index 236856bc..2a45ac1f 100644 --- a/assets/resources/game/gui/get.prefab +++ b/assets/resources/game/gui/get.prefab @@ -31,26 +31,41 @@ "__id__": 26 }, { - "__id__": 32 - } - ], - "_active": true, - "_components": [ - { - "__id__": 38 - }, - { - "__id__": 40 + "__id__": 34 }, { "__id__": 42 }, { - "__id__": 45 + "__id__": 50 + }, + { + "__id__": 58 + }, + { + "__id__": 66 + }, + { + "__id__": 72 + } + ], + "_active": true, + "_components": [ + { + "__id__": 78 + }, + { + "__id__": 80 + }, + { + "__id__": 82 + }, + { + "__id__": 85 } ], "_prefab": { - "__id__": 47 + "__id__": 87 }, "_lpos": { "__type__": "cc.Vec3", @@ -83,14 +98,14 @@ }, { "__type__": "cc.Node", - "_name": "blue", + "_name": "Atk", "_objFlags": 0, "__editorExtras__": {}, "_parent": { "__id__": 1 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 3 @@ -160,7 +175,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "31o7/OgH5OoJvzVsOsk8Yq" + "fileId": "c7kStJsN1PcrNAo7BaWWnn" }, { "__type__": "cc.Sprite", @@ -205,7 +220,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "a9mctR4pNBb6S5jNVb8cI/" + "fileId": "edXqllHNtCKJ8msZUdNuID" }, { "__type__": "cc.Widget", @@ -241,7 +256,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "19EqOfxaFCpbfjxJwZEYZk" + "fileId": "abN7JKB+FMB59gTd2HRUTn" }, { "__type__": "cc.PrefabInfo", @@ -251,21 +266,21 @@ "asset": { "__id__": 0 }, - "fileId": "455BS5j9RDkZPLQA0s0OSg", + "fileId": "9dpCkb8YNNkK8oe8WAGa0K", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { "__type__": "cc.Node", - "_name": "orange", + "_name": "Atked", "_objFlags": 0, "__editorExtras__": {}, "_parent": { "__id__": 1 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 11 @@ -323,8 +338,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 220, - "height": 220 + "width": 330, + "height": 480 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -335,7 +350,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "ed0oECoANIYbNuGZxHVg4/" + "fileId": "20w3KGsMdBfKIW/mw5XAmr" }, { "__type__": "cc.Sprite", @@ -360,7 +375,7 @@ "a": 255 }, "_spriteFrame": { - "__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a@21123", + "__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a@75b82", "__expectedType__": "cc.SpriteFrame" }, "_type": 1, @@ -375,12 +390,15 @@ "_fillRange": 0, "_isTrimmedMode": true, "_useGrayscale": false, - "_atlas": null, + "_atlas": { + "__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a", + "__expectedType__": "cc.SpriteAtlas" + }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "94QeMJwn5AB7Vkxs/mgZRm" + "fileId": "3bDwmsloVHY5EZHtUoQnTK" }, { "__type__": "cc.Widget", @@ -416,7 +434,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "69zqB/Z8JCipjmz7TnADhH" + "fileId": "18AGOck7xFAL0l6gkIcj++" }, { "__type__": "cc.PrefabInfo", @@ -426,21 +444,21 @@ "asset": { "__id__": 0 }, - "fileId": "dbNAxsl6hIebqFIWTCDLh9", + "fileId": "91CxG7B1RPsZ4oAjjyZs2r", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { "__type__": "cc.Node", - "_name": "white", + "_name": "Buff", "_objFlags": 0, "__editorExtras__": {}, "_parent": { "__id__": 1 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 19 @@ -510,7 +528,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "b9YsNUGsNFDbLRm47NstL8" + "fileId": "fbUyeEcsFMOqKtOtFzKV76" }, { "__type__": "cc.Sprite", @@ -529,13 +547,13 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 153, - "g": 153, - "b": 153, + "r": 255, + "g": 255, + "b": 255, "a": 255 }, "_spriteFrame": { - "__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a@ec412", + "__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a@21123", "__expectedType__": "cc.SpriteFrame" }, "_type": 1, @@ -555,7 +573,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "85iJSX5V5LoZ/GfYxjs/an" + "fileId": "102P9zPtBPWJUIrqeSheFF" }, { "__type__": "cc.Widget", @@ -591,7 +609,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "c4ve/FeQxD26gYWVgPNmtz" + "fileId": "99KJCqMi1N5qqmS8HwGnqP" }, { "__type__": "cc.PrefabInfo", @@ -601,7 +619,894 @@ "asset": { "__id__": 0 }, - "fileId": "29BrKENztKIKrj0DItAD25", + "fileId": "d4mkYZ8S1CebNEPR6rzzFS", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Attr", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 27 + }, + { + "__id__": 29 + }, + { + "__id__": 31 + } + ], + "_prefab": { + "__id__": 33 + }, + "_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__": 26 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 220, + "height": 220 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "1609gScxZLE6FZI95xcXVR" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 26 + }, + "_enabled": true, + "__prefab": { + "__id__": 30 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a@21123", + "__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__": "deedea09-8f2b-400f-9803-4cfd38e45d1a", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "38kC0/oQxJCaBJMEb6N67v" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 26 + }, + "_enabled": true, + "__prefab": { + "__id__": 32 + }, + "_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": 229, + "_originalHeight": 63, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9fm5NcM7dO+ZSkyd3enBL3" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "82+b6K8zVJIoeE1mcTB28Y", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Skill", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 35 + }, + { + "__id__": 37 + }, + { + "__id__": 39 + } + ], + "_prefab": { + "__id__": 41 + }, + "_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__": 34 + }, + "_enabled": true, + "__prefab": { + "__id__": 36 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 220, + "height": 220 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "75xN3HuFRKkIRHFRFtjmpG" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": { + "__id__": 38 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a@75b82", + "__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__": "deedea09-8f2b-400f-9803-4cfd38e45d1a", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d7q5yXUO1LmqpbC64yG8O8" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": { + "__id__": 40 + }, + "_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": 229, + "_originalHeight": 63, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "49zUES4YlFpbhtJYYBDtBK" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "89seWYhP9KApwx123HKQBA", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Hp", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 43 + }, + { + "__id__": 45 + }, + { + "__id__": 47 + } + ], + "_prefab": { + "__id__": 49 + }, + "_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__": 42 + }, + "_enabled": true, + "__prefab": { + "__id__": 44 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 220, + "height": 220 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f47YOBV+RGZY2u3pBYHbGD" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 42 + }, + "_enabled": true, + "__prefab": { + "__id__": 46 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 19, + "b": 19, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a@21123", + "__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__": "deedea09-8f2b-400f-9803-4cfd38e45d1a", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "99Kl2A4OVPUZ1LhO4XAI3M" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 42 + }, + "_enabled": true, + "__prefab": { + "__id__": 48 + }, + "_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": 229, + "_originalHeight": 63, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "eeehvIOm5MGom5DA6YyOeP" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "afQQ8ExKtBFqNSNH0rz626", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Dead", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 51 + }, + { + "__id__": 53 + }, + { + "__id__": 55 + } + ], + "_prefab": { + "__id__": 57 + }, + "_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__": 50 + }, + "_enabled": true, + "__prefab": { + "__id__": 52 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 220, + "height": 220 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "dcT6SxEqFNQa0AsqpEtVdA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": { + "__id__": 54 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 194, + "g": 194, + "b": 194, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a@ec412", + "__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": "eeVENI9SdAUorpYR0WtdZZ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": { + "__id__": 56 + }, + "_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": 229, + "_originalHeight": 63, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "08ZEu+RhBGr7wOsP51cMZ9" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "0aAGAcTk9KJK8JtNzF0s/X", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Partner", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 59 + }, + { + "__id__": 61 + }, + { + "__id__": 63 + } + ], + "_prefab": { + "__id__": 65 + }, + "_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__": 58 + }, + "_enabled": true, + "__prefab": { + "__id__": 60 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 220, + "height": 220 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8c+XqZ4WRDVI90aO2qbxO8" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 58 + }, + "_enabled": true, + "__prefab": { + "__id__": 62 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "deedea09-8f2b-400f-9803-4cfd38e45d1a@21123", + "__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__": "deedea09-8f2b-400f-9803-4cfd38e45d1a", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "61Qy/zP4FJXLiomHbJY/H0" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 58 + }, + "_enabled": true, + "__prefab": { + "__id__": 64 + }, + "_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": 229, + "_originalHeight": 63, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "10TVZRuhVOZatpDcmbIfvX" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "cfhroH0VFJlq4Se62cfOB7", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -618,14 +1523,14 @@ "_active": true, "_components": [ { - "__id__": 27 + "__id__": 67 }, { - "__id__": 29 + "__id__": 69 } ], "_prefab": { - "__id__": 31 + "__id__": 71 }, "_lpos": { "__type__": "cc.Vec3", @@ -662,11 +1567,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 26 + "__id__": 66 }, "_enabled": true, "__prefab": { - "__id__": 28 + "__id__": 68 }, "_contentSize": { "__type__": "cc.Size", @@ -690,11 +1595,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 26 + "__id__": 66 }, "_enabled": true, "__prefab": { - "__id__": 30 + "__id__": 70 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -754,14 +1659,14 @@ "_active": true, "_components": [ { - "__id__": 33 + "__id__": 73 }, { - "__id__": 35 + "__id__": 75 } ], "_prefab": { - "__id__": 37 + "__id__": 77 }, "_lpos": { "__type__": "cc.Vec3", @@ -798,11 +1703,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 32 + "__id__": 72 }, "_enabled": true, "__prefab": { - "__id__": 34 + "__id__": 74 }, "_contentSize": { "__type__": "cc.Size", @@ -826,11 +1731,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 32 + "__id__": 72 }, "_enabled": true, "__prefab": { - "__id__": 36 + "__id__": 76 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -911,7 +1816,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 39 + "__id__": 79 }, "_contentSize": { "__type__": "cc.Size", @@ -939,7 +1844,7 @@ }, "_enabled": false, "__prefab": { - "__id__": 41 + "__id__": 81 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -984,11 +1889,11 @@ }, "_enabled": true, "__prefab": { - "__id__": 43 + "__id__": 83 }, "clickEvents": [ { - "__id__": 44 + "__id__": 84 } ], "_interactable": true, @@ -1052,7 +1957,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 46 + "__id__": 86 }, "_id": "" }, diff --git a/assets/resources/gui/uis/bgs/card.prefab b/assets/resources/gui/uis/bgs/card.prefab index 26b390e5..d68835bf 100644 --- a/assets/resources/gui/uis/bgs/card.prefab +++ b/assets/resources/gui/uis/bgs/card.prefab @@ -464,7 +464,7 @@ "__id__": 1 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 19 @@ -639,7 +639,7 @@ "__id__": 1 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 27 diff --git a/assets/script/game/map/MissionGetsComp.ts b/assets/script/game/map/MissionGetsComp.ts index 20481a3d..ee5fc553 100644 --- a/assets/script/game/map/MissionGetsComp.ts +++ b/assets/script/game/map/MissionGetsComp.ts @@ -4,6 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { GameEvent } from "../common/config/GameEvent"; import { smc } from "../common/SingletonModuleComp"; +import { CardKind } from "../common/config/GameSet"; const { ccclass, property } = _decorator; @@ -72,6 +73,49 @@ export class MissionGetsCompComp extends CCComp { this.get_nodes.push(node); node.getChildByName("num").getComponent(Label).string = "1"; + + // 先隐藏所有类型标识 + const typeNodes = ["Atk", "Atked", "Buff", "Attr", "Skill", "Hp", "Dead", "Partner"]; + // 1. 处理 bg 节点 + typeNodes.forEach(nodeName => { + const node_bg = node.getChildByName(nodeName); + if (node_bg) node_bg.active = false; + }); + // 根据 kind 激活bg + let activeNodeName = ""; + switch (type) { + case CardKind.Atk: + activeNodeName = "Atk"; + break; + case CardKind.Atted: + activeNodeName = "Atked"; + break; + case CardKind.Buff: + activeNodeName = "Buff"; + break; + case CardKind.Attr: + activeNodeName = "Attr"; + break; + case CardKind.Skill: + activeNodeName = "Skill"; + break; + case CardKind.Hp: + activeNodeName = "Hp"; + break; + case CardKind.Dead: + activeNodeName = "Dead"; + break; + case CardKind.Partner: + activeNodeName = "Partner"; + break; + } + + if (activeNodeName) { + // 激活bg + const activeNode = node.getChildByName(activeNodeName); + if (activeNode) activeNode.active = true; + } + const sprite = node.getChildByName("icon").getComponent(Sprite); if (!sprite) return;