From 6eb51c8535ebf8182a6c4b09ad73002bd0d806ce Mon Sep 17 00:00:00 2001 From: panFD Date: Sun, 23 Aug 2026 16:10:06 +0800 Subject: [PATCH] feat(map): add hero card chip view component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增了图鉴卡牌预制体组件ChipComp,负责渲染卡牌图标与背景底框,支持英雄卡动画播放和普通卡牌静态图标展示,同时提供了数据设置、清空等对外接口。 --- assets/resources/gui/element/clips.prefab | 2927 +++++++++++++++++ .../resources/gui/element/clips.prefab.meta | 13 + assets/script/game/map/ChipComp.ts | 258 ++ 3 files changed, 3198 insertions(+) create mode 100644 assets/resources/gui/element/clips.prefab create mode 100644 assets/resources/gui/element/clips.prefab.meta create mode 100644 assets/script/game/map/ChipComp.ts diff --git a/assets/resources/gui/element/clips.prefab b/assets/resources/gui/element/clips.prefab new file mode 100644 index 00000000..82d81956 --- /dev/null +++ b/assets/resources/gui/element/clips.prefab @@ -0,0 +1,2927 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "clips", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "clips", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 199 + } + ], + "_active": true, + "_components": [ + { + "__id__": 215 + } + ], + "_prefab": { + "__id__": 217 + }, + "_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": "hbg", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 24 + }, + { + "__id__": 58 + }, + { + "__id__": 92 + }, + { + "__id__": 126 + }, + { + "__id__": 160 + } + ], + "_active": true, + "_components": [ + { + "__id__": 194 + }, + { + "__id__": 196 + } + ], + "_prefab": { + "__id__": 198 + }, + "_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.7, + "y": 0.7, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_prefab": { + "__id__": 4 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 3 + }, + "asset": { + "__uuid__": "56a982e0-00ae-4ea4-a412-b54666d0e78b", + "__expectedType__": "cc.Prefab" + }, + "fileId": "ee9HwyGFhDTarF97iXfEHu", + "instance": { + "__id__": 5 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "75H+OTxYlE5bEJKOODIeZy", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 6 + }, + { + "__id__": 8 + }, + { + "__id__": 9 + }, + { + "__id__": 10 + }, + { + "__id__": 11 + }, + { + "__id__": 12 + }, + { + "__id__": 14 + }, + { + "__id__": 16 + }, + { + "__id__": 18 + }, + { + "__id__": 20 + }, + { + "__id__": 22 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 7 + }, + "propertyPath": [ + "_name" + ], + "value": "yellow" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "ee9HwyGFhDTarF97iXfEHu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 7 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 7 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 7 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 7 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 13 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 57.142857142857146, + "height": 57.142857142857146 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "afvZZKnn9Fb5obG6jVyKta" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 15 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 98.28571428571429, + "height": 98.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "16PS2L0JBEEoS7TAT1HRoZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 17 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 106.28571428571429, + "height": 106.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "59WtR+lBhBiIzfpFWU1cG8" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 19 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 114.28571428571429, + "height": 114.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "6fsOId08VB9bqPtzuiF8/t" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 21 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -20.321428571428573, + "y": 22.321428571428573, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "75w8fK3CJCSbcfUF7Bzbl3" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 23 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 106.28571428571429, + "height": 44 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "1f2dXBc41DFp8cNetX1car" + ] + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_prefab": { + "__id__": 25 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 24 + }, + "asset": { + "__uuid__": "56a982e0-00ae-4ea4-a412-b54666d0e78b", + "__expectedType__": "cc.Prefab" + }, + "fileId": "ee9HwyGFhDTarF97iXfEHu", + "instance": { + "__id__": 26 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "869HLE0JRL4I+BR5m5i/q+", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 27 + }, + { + "__id__": 29 + }, + { + "__id__": 30 + }, + { + "__id__": 31 + }, + { + "__id__": 32 + }, + { + "__id__": 34 + }, + { + "__id__": 36 + }, + { + "__id__": 38 + }, + { + "__id__": 40 + }, + { + "__id__": 42 + }, + { + "__id__": 44 + }, + { + "__id__": 46 + }, + { + "__id__": 47 + }, + { + "__id__": 49 + }, + { + "__id__": 51 + }, + { + "__id__": 53 + }, + { + "__id__": 55 + }, + { + "__id__": 56 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 28 + }, + "propertyPath": [ + "_name" + ], + "value": "blue" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "ee9HwyGFhDTarF97iXfEHu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 28 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 28 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 28 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 33 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 34, + "g": 71, + "b": 121, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "d67w0LWpZGDIOKFRdClHxZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 35 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 113, + "g": 211, + "b": 220, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "08nT29mQpCLKxN2SVjI3cu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 37 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 56, + "g": 154, + "b": 201, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "8dxUNBKXNN1ZD0UUu6Y+ek" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 39 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3fzhiI2P9Os7ruQJg+Awdq" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 41 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "75w8fK3CJCSbcfUF7Bzbl3" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 43 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "a6a/8vYCBFl5hxt8lfklSI" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 45 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3994XTlbxF7YxpLo9qDrmy" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 28 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 48 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 57.142857142857146, + "height": 57.142857142857146 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "afvZZKnn9Fb5obG6jVyKta" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 50 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 98.28571428571429, + "height": 98.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "16PS2L0JBEEoS7TAT1HRoZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 52 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 106.28571428571429, + "height": 106.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "59WtR+lBhBiIzfpFWU1cG8" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 54 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 114.28571428571429, + "height": 114.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "6fsOId08VB9bqPtzuiF8/t" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 41 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -20.321428571428573, + "y": 22.321428571428573, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 57 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 106.28571428571429, + "height": 44 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "1f2dXBc41DFp8cNetX1car" + ] + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_prefab": { + "__id__": 59 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 58 + }, + "asset": { + "__uuid__": "56a982e0-00ae-4ea4-a412-b54666d0e78b", + "__expectedType__": "cc.Prefab" + }, + "fileId": "ee9HwyGFhDTarF97iXfEHu", + "instance": { + "__id__": 60 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "14qCv6uDpLp5b/y2VFbtmi", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 61 + }, + { + "__id__": 63 + }, + { + "__id__": 64 + }, + { + "__id__": 65 + }, + { + "__id__": 66 + }, + { + "__id__": 68 + }, + { + "__id__": 70 + }, + { + "__id__": 72 + }, + { + "__id__": 74 + }, + { + "__id__": 76 + }, + { + "__id__": 78 + }, + { + "__id__": 80 + }, + { + "__id__": 81 + }, + { + "__id__": 83 + }, + { + "__id__": 85 + }, + { + "__id__": 87 + }, + { + "__id__": 89 + }, + { + "__id__": 90 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 62 + }, + "propertyPath": [ + "_name" + ], + "value": "red" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "ee9HwyGFhDTarF97iXfEHu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 62 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 62 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 62 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 67 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 124, + "g": 25, + "b": 25, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "d67w0LWpZGDIOKFRdClHxZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 69 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 194, + "g": 53, + "b": 66, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "08nT29mQpCLKxN2SVjI3cu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 71 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 194, + "g": 53, + "b": 66, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "8dxUNBKXNN1ZD0UUu6Y+ek" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 73 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3fzhiI2P9Os7ruQJg+Awdq" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 75 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "75w8fK3CJCSbcfUF7Bzbl3" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 77 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "a6a/8vYCBFl5hxt8lfklSI" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 79 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3994XTlbxF7YxpLo9qDrmy" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 62 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 82 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 57.142857142857146, + "height": 57.142857142857146 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "afvZZKnn9Fb5obG6jVyKta" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 84 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 98.28571428571429, + "height": 98.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "16PS2L0JBEEoS7TAT1HRoZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 86 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 106.28571428571429, + "height": 106.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "59WtR+lBhBiIzfpFWU1cG8" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 88 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 114.28571428571429, + "height": 114.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "6fsOId08VB9bqPtzuiF8/t" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 75 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -20.321428571428573, + "y": 22.321428571428573, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 91 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 106.28571428571429, + "height": 44 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "1f2dXBc41DFp8cNetX1car" + ] + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_prefab": { + "__id__": 93 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 92 + }, + "asset": { + "__uuid__": "56a982e0-00ae-4ea4-a412-b54666d0e78b", + "__expectedType__": "cc.Prefab" + }, + "fileId": "ee9HwyGFhDTarF97iXfEHu", + "instance": { + "__id__": 94 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "a3rA0Y8plL+ZsYUQlgiM9b", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 95 + }, + { + "__id__": 97 + }, + { + "__id__": 98 + }, + { + "__id__": 99 + }, + { + "__id__": 100 + }, + { + "__id__": 102 + }, + { + "__id__": 104 + }, + { + "__id__": 106 + }, + { + "__id__": 108 + }, + { + "__id__": 110 + }, + { + "__id__": 112 + }, + { + "__id__": 114 + }, + { + "__id__": 115 + }, + { + "__id__": 117 + }, + { + "__id__": 119 + }, + { + "__id__": 121 + }, + { + "__id__": 123 + }, + { + "__id__": 124 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 96 + }, + "propertyPath": [ + "_name" + ], + "value": "green" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "ee9HwyGFhDTarF97iXfEHu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 96 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 96 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 96 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 101 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 33, + "g": 112, + "b": 91, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "d67w0LWpZGDIOKFRdClHxZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 103 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 87, + "g": 213, + "b": 116, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "08nT29mQpCLKxN2SVjI3cu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 105 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 19, + "g": 165, + "b": 84, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "8dxUNBKXNN1ZD0UUu6Y+ek" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 107 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3fzhiI2P9Os7ruQJg+Awdq" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 109 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "75w8fK3CJCSbcfUF7Bzbl3" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 111 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "a6a/8vYCBFl5hxt8lfklSI" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 113 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3994XTlbxF7YxpLo9qDrmy" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 96 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 116 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 57.142857142857146, + "height": 57.142857142857146 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "afvZZKnn9Fb5obG6jVyKta" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 118 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 98.28571428571429, + "height": 98.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "16PS2L0JBEEoS7TAT1HRoZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 120 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 106.28571428571429, + "height": 106.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "59WtR+lBhBiIzfpFWU1cG8" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 122 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 114.28571428571429, + "height": 114.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "6fsOId08VB9bqPtzuiF8/t" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 109 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -20.321428571428573, + "y": 22.321428571428573, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 125 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 106.28571428571429, + "height": 44 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "1f2dXBc41DFp8cNetX1car" + ] + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_prefab": { + "__id__": 127 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 126 + }, + "asset": { + "__uuid__": "56a982e0-00ae-4ea4-a412-b54666d0e78b", + "__expectedType__": "cc.Prefab" + }, + "fileId": "ee9HwyGFhDTarF97iXfEHu", + "instance": { + "__id__": 128 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "84np8hkE9EHbKDN0Qi/dXU", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 129 + }, + { + "__id__": 131 + }, + { + "__id__": 132 + }, + { + "__id__": 133 + }, + { + "__id__": 134 + }, + { + "__id__": 136 + }, + { + "__id__": 138 + }, + { + "__id__": 140 + }, + { + "__id__": 142 + }, + { + "__id__": 144 + }, + { + "__id__": 146 + }, + { + "__id__": 148 + }, + { + "__id__": 149 + }, + { + "__id__": 151 + }, + { + "__id__": 153 + }, + { + "__id__": 155 + }, + { + "__id__": 157 + }, + { + "__id__": 158 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 130 + }, + "propertyPath": [ + "_name" + ], + "value": "purple" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "ee9HwyGFhDTarF97iXfEHu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 130 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 130 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 130 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 135 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 73, + "g": 19, + "b": 107, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "d67w0LWpZGDIOKFRdClHxZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 137 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 203, + "g": 99, + "b": 250, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "08nT29mQpCLKxN2SVjI3cu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 139 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 163, + "g": 56, + "b": 213, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "8dxUNBKXNN1ZD0UUu6Y+ek" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 141 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3fzhiI2P9Os7ruQJg+Awdq" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 143 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "75w8fK3CJCSbcfUF7Bzbl3" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 145 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "a6a/8vYCBFl5hxt8lfklSI" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 147 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3994XTlbxF7YxpLo9qDrmy" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 130 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 150 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 57.142857142857146, + "height": 57.142857142857146 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "afvZZKnn9Fb5obG6jVyKta" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 152 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 98.28571428571429, + "height": 98.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "16PS2L0JBEEoS7TAT1HRoZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 154 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 106.28571428571429, + "height": 106.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "59WtR+lBhBiIzfpFWU1cG8" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 156 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 114.28571428571429, + "height": 114.28571428571429 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "6fsOId08VB9bqPtzuiF8/t" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 143 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -20.321428571428573, + "y": 22.321428571428573, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 159 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 106.28571428571429, + "height": 44 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "1f2dXBc41DFp8cNetX1car" + ] + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_prefab": { + "__id__": 161 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 160 + }, + "asset": { + "__uuid__": "56a982e0-00ae-4ea4-a412-b54666d0e78b", + "__expectedType__": "cc.Prefab" + }, + "fileId": "ee9HwyGFhDTarF97iXfEHu", + "instance": { + "__id__": 162 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "af66DcR3pNdYWadBzpEGYr", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 163 + }, + { + "__id__": 165 + }, + { + "__id__": 166 + }, + { + "__id__": 167 + }, + { + "__id__": 168 + }, + { + "__id__": 170 + }, + { + "__id__": 172 + }, + { + "__id__": 174 + }, + { + "__id__": 176 + }, + { + "__id__": 178 + }, + { + "__id__": 180 + }, + { + "__id__": 182 + }, + { + "__id__": 183 + }, + { + "__id__": 185 + }, + { + "__id__": 187 + }, + { + "__id__": 189 + }, + { + "__id__": 191 + }, + { + "__id__": 192 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 164 + }, + "propertyPath": [ + "_name" + ], + "value": "white" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "ee9HwyGFhDTarF97iXfEHu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 164 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 164 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 164 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 169 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "d67w0LWpZGDIOKFRdClHxZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 171 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 226, + "g": 226, + "b": 226, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "08nT29mQpCLKxN2SVjI3cu" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 173 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 190, + "g": 190, + "b": 190, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "8dxUNBKXNN1ZD0UUu6Y+ek" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 175 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3fzhiI2P9Os7ruQJg+Awdq" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 177 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "75w8fK3CJCSbcfUF7Bzbl3" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 179 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "a6a/8vYCBFl5hxt8lfklSI" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 181 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3994XTlbxF7YxpLo9qDrmy" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 164 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 184 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 100, + "height": 115 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "afvZZKnn9Fb5obG6jVyKta" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 186 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 184, + "height": 214 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "16PS2L0JBEEoS7TAT1HRoZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 188 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 192, + "height": 222 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "59WtR+lBhBiIzfpFWU1cG8" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 190 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 200, + "height": 230 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "6fsOId08VB9bqPtzuiF8/t" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 177 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -41.75, + "y": 51.25, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 193 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 192, + "height": 44 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "1f2dXBc41DFp8cNetX1car" + ] + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 195 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 57.142857142857146, + "height": 57.142857142857146 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9aTUqxLN1PtaHzv6pEXHSQ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 197 + }, + "_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": 80, + "_originalHeight": 80, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "7aG46LGCVHELyLn7BXCr53" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "a0r+lO0PxJtqCTvVNqaer2", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Mask", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 200 + } + ], + "_active": true, + "_components": [ + { + "__id__": 206 + }, + { + "__id__": 208 + }, + { + "__id__": 210 + }, + { + "__id__": 212 + } + ], + "_prefab": { + "__id__": 214 + }, + "_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": "icon", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 199 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 201 + }, + { + "__id__": 203 + } + ], + "_prefab": { + "__id__": 205 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -0.088, + "y": -2.829, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": -0.8, + "y": 0.8, + "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__": 200 + }, + "_enabled": true, + "__prefab": { + "__id__": 202 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 128, + "height": 128 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6brO0gQERFhKTvy0dcD/6C" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 200 + }, + "_enabled": true, + "__prefab": { + "__id__": 204 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "1fda2882-2baf-4446-96cc-492ef2722f05@46381", + "__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__": "1fda2882-2baf-4446-96cc-492ef2722f05", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "7cosjDf05EiIhghQMGeFkV" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "08p7XmUnpCJKHgFSs+XBKi", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 199 + }, + "_enabled": true, + "__prefab": { + "__id__": 207 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "aePszddr1FjZ9yJvRxiJCh" + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 199 + }, + "_enabled": true, + "__prefab": { + "__id__": 209 + }, + "_type": 3, + "_inverted": false, + "_segments": 64, + "_alphaThreshold": 0.1, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "30z9tbKlRCK6y2Qz9fwmlG" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 199 + }, + "_enabled": true, + "__prefab": { + "__id__": 211 + }, + "_alignFlags": 45, + "_target": null, + "_left": 4, + "_right": 4, + "_top": 4, + "_bottom": 4, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 200, + "_originalHeight": 50, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "04ra6VOgxPp6iBjs7Skbtw" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 199 + }, + "_enabled": true, + "__prefab": { + "__id__": 213 + }, + "_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@c77a7", + "__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": "83K+DBbRxDtKtzBV5gs2Ow" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "5cWLGvgr1MdLSDfUJV31tJ", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 216 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b6/HPesdpG8ZsWB4vg6xf2" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "24rlgXRJ9AHLGpMW+aYyEx", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": [ + { + "__id__": 160 + }, + { + "__id__": 126 + }, + { + "__id__": 92 + }, + { + "__id__": 58 + }, + { + "__id__": 24 + }, + { + "__id__": 3 + } + ] + } +] \ No newline at end of file diff --git a/assets/resources/gui/element/clips.prefab.meta b/assets/resources/gui/element/clips.prefab.meta new file mode 100644 index 00000000..da67b30e --- /dev/null +++ b/assets/resources/gui/element/clips.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "4b8fb686-b649-4525-9aae-df0e7369205b", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "clips" + } +} diff --git a/assets/script/game/map/ChipComp.ts b/assets/script/game/map/ChipComp.ts new file mode 100644 index 00000000..2ffa4749 --- /dev/null +++ b/assets/script/game/map/ChipComp.ts @@ -0,0 +1,258 @@ +/** + * @file ChipComp.ts + * @description 英雄图鉴卡预制体组件(UI 视图层·精简版) + * + * 职责: + * 1. 根据卡牌配置渲染 **图标**(英雄卡为 idle 动画,其他卡为静态图集帧)。 + * 2. 根据 card_lv / kind 渲染 **背景底框**。 + * + * 说明: + * - 仅保留图标与背景渲染能力,名称、费用、等级等展示由外部组件负责。 + * - 通过 iconVisualToken 防止异步动画加载竞态。 + * + * 依赖: + * - CardConfig / CardType / CKind / CardPoolList(CardSet) + * - HeroInfo(heroSet)、SkillSet(SkillSet) + * - smc —— 全局单例,访问图标图集缓存 + */ +import { mLogger } from "../common/Logger"; +import { _decorator, Animation, AnimationClip, Node, Sprite, Vec3, resources } 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 { CardConfig, CardType, CKind, CardPoolList } from "../common/config/CardSet"; +import { CardBgComp } from "./CardBgComp"; +import { HeroInfo } from "../common/config/heroSet"; +import { SkillSet } from "../common/config/SkillSet"; +import { smc } from "../common/SingletonModuleComp"; + +const { ccclass, property } = _decorator; + +/** + * ChipComp —— 单张卡牌图标/背景视图组件 + * + * 挂载在图鉴卡预制体上,仅负责图标与背景的渲染。 + */ +@ccclass('ChipComp') +@ecs.register('ChipComp', false) +export class ChipComp extends CCComp { + private debugMode: boolean = false; + + // ======================== 编辑器绑定节点 ======================== + + @property(Node) + icon_node: Node = null! + @property(Node) + BG_node: Node = null! + + // ======================== 运行时状态 ======================== + + card_uuid: number = 0 + card_type: CardType = CardType.Hero + private cardData: CardConfig | null = null; + private iconVisualToken: number = 0; + + // ======================== 生命周期 ======================== + + onLoad() { + if (!this.cardData) { + this.applyEmptyUI(); + } + } + + // ======================== 对外接口 ======================== + + /** + * 设置卡牌数据并渲染图标与背景。 + * @param data 卡牌配置数据 + */ + setData(data: CardConfig) { + if (!data) return; + this.cardData = data; + this.card_uuid = data.uuid; + this.card_type = data.type; + this.node.active = true; + this.applyCardUI(); + mLogger.log(this.debugMode, "ChipComp", "setData", { + uuid: this.card_uuid, + type: this.card_type + }); + } + + /** + * 便捷方法:通过英雄 UUID 和卡池等级直接设置英雄卡。 + * 自动从 CardPoolList 查找匹配的卡牌配置。 + * @param uuid 英雄 UUID + * @param cardLv 卡牌等级(默认 1) + */ + setHeroByUuid(uuid: number, cardLv: number = 1) { + const card = CardPoolList.find(c => c.uuid === uuid && c.card_lv === cardLv); + if (card) { + this.setData(card); + return; + } + const hero = HeroInfo[uuid]; + if (hero) { + this.setData({ + uuid: hero.uuid, + type: CardType.Hero, + cost: 0, + weight: 0, + card_lv: cardLv, + kind: CKind.Hero, + hero_lv: smc.getHeroOuterLv(hero.uuid) + }); + } + } + + /** 查询当前是否有卡牌数据 */ + hasCard(): boolean { + return !!this.cardData; + } + + /** 获取当前卡牌数据 */ + getCardData(): CardConfig | null { + return this.cardData; + } + + /** 清空卡牌数据并重置 UI */ + clear() { + this.cardData = null; + this.card_uuid = 0; + this.card_type = CardType.Hero; + this.applyEmptyUI(); + this.node.active = false; + } + + // ======================== UI 渲染 ======================== + + /** 渲染图标与背景 */ + private applyCardUI() { + if (!this.cardData) { + this.applyEmptyUI(); + return; + } + + this.iconVisualToken += 1; + const kindName = CKind[this.cardData.kind]; + + // 背景:按 kind 显示对应底框,按 card_lv 应用等级样式 + if (this.BG_node) { + const bgLv = this.cardData.base_card_lv ?? this.cardData.card_lv; + this.BG_node.children.forEach(child => { + child.active = (child.name === kindName); + const bg = child.getComponent(CardBgComp); + if (bg) child.active ? bg.apply(bgLv) : bg.clear(); + }); + } + + // 图标:英雄卡播放 idle 动画,其他卡使用静态图集帧 + if (this.icon_node) { + const iconNode = this.icon_node; + if (this.card_type === CardType.Hero) { + // 英雄图标做镜像翻转(原图朝右,卡面需朝左) + iconNode.setScale(new Vec3(-1.5, 1.5, 1)); + this.updateHeroAnimation(iconNode, this.card_uuid, this.iconVisualToken); + return; + } + iconNode.setScale(new Vec3(1, 1, 1)); + this.clearIconAnimation(iconNode); + const iconId = this.resolveCardIconId(this.card_type, this.card_uuid); + if (iconId) { + this.updateIcon(iconNode, iconId); + } else { + const sprite = iconNode.getComponent(Sprite) || iconNode.getComponentInChildren(Sprite); + if (sprite) sprite.spriteFrame = null; + } + } + } + + /** 渲染空槽状态:清空图标与背景 */ + private applyEmptyUI() { + this.iconVisualToken += 1; + if (this.BG_node) { + this.BG_node.children.forEach(child => { + child.active = false; + const bg = child.getComponent(CardBgComp); + if (bg) bg.clear(); + }); + } + if (this.icon_node) { + this.icon_node.setScale(new Vec3(1, 1, 1)); + this.clearIconAnimation(this.icon_node); + const sprite = this.icon_node.getComponent(Sprite) || this.icon_node.getComponentInChildren(Sprite); + if (sprite) sprite.spriteFrame = null; + } + } + + // ======================== 工具方法 ======================== + + /** 更新图标:从全局缓存图集中获取对应帧 */ + private updateIcon(node: Node, iconId: string) { + if (!node || !iconId) return; + const sprite = node.getComponent(Sprite) || node.getComponentInChildren(Sprite); + if (!sprite) return; + if (smc.uiconsAtlas) { + const frame = smc.uiconsAtlas.getSpriteFrame(iconId); + sprite.spriteFrame = frame || null; + } + } + + /** 根据卡牌类型和 UUID 解析出图标 ID(在 SpriteAtlas 中的帧名) */ + private resolveCardIconId(type: CardType, uuid: number): string { + if (type === CardType.Skill) { + return SkillSet[uuid]?.icon || `${uuid}`; + } + if (type === CardType.Hero) { + return HeroInfo[uuid]?.icon || `${uuid}`; + } + return `${uuid}`; + } + + /** + * 为英雄卡图标加载并播放 idle 动画。 + * 使用 token 做竞态保护,确保异步回调时不会覆盖已更新的图标。 + */ + private updateHeroAnimation(node: Node, uuid: number, token: number) { + const sprite = node?.getComponent(Sprite) || node?.getComponentInChildren(Sprite); + if (sprite) sprite.spriteFrame = null; + const hero = HeroInfo[uuid]; + if (!hero) return; + const anim = node.getComponent(Animation) || node.addComponent(Animation); + this.clearAnimationClips(anim); + const path = `game/heros/hero/${hero.path}/idle`; + resources.load(path, AnimationClip, (err, clip) => { + if (err || !clip) { + mLogger.log(this.debugMode, "ChipComp", `load hero animation failed ${uuid}`, err); + return; + } + if (token !== this.iconVisualToken || !this.cardData || this.card_type !== CardType.Hero || this.card_uuid !== uuid) { + return; + } + this.clearAnimationClips(anim); + anim.addClip(clip); + anim.play("idle"); + }); + } + + /** 清除图标节点上的动画(停止播放并移除所有 clip) */ + private clearIconAnimation(node: Node) { + const anim = node?.getComponent(Animation); + if (!anim) return; + anim.stop(); + this.clearAnimationClips(anim); + } + + /** 移除 Animation 组件上的全部 AnimationClip */ + private clearAnimationClips(anim: Animation) { + const clips = anim.clips as AnimationClip[] | undefined; + if (!clips || clips.length === 0) return; + [...clips].forEach(clip => anim.removeClip(clip, true)); + } + + // ======================== 生命周期钩子 ======================== + + /** ECS 组件移除时的释放钩子:销毁节点 */ + reset() { + this.node.destroy(); + } +}