From a3354d95954be1e46ec44cde1ee61195b5281a10 Mon Sep 17 00:00:00 2001 From: panFD Date: Wed, 22 Jul 2026 22:22:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(missionCard):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=8F=AC=E5=94=A4=E8=8B=B1=E9=9B=84=E5=89=8D=E7=9A=84=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E9=94=81=E5=AE=9A=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 为角色控制器预制体绑定home_btn节点 2. 添加nock_node节点引用与召唤状态标记 3. 新增面板交互状态更新方法,通过阻挡层控制按钮可用性 4. 在技能/商店/装备面板点击事件中增加召唤英雄前置校验 5. 首次召唤英雄后解锁所有功能面板并重置初始状态 --- assets/resources/gui/element/mission.prefab | 1345 +++++++++++++++++-- assets/resources/gui/role_controller.prefab | 4 +- assets/script/game/map/MissionCardComp.ts | 62 +- 3 files changed, 1262 insertions(+), 149 deletions(-) diff --git a/assets/resources/gui/element/mission.prefab b/assets/resources/gui/element/mission.prefab index 9ee5a628..8760d514 100644 --- a/assets/resources/gui/element/mission.prefab +++ b/assets/resources/gui/element/mission.prefab @@ -47,37 +47,40 @@ }, { "__id__": 2025 + }, + { + "__id__": 2154 } ], "_active": true, "_components": [ { - "__id__": 2142 + "__id__": 2194 }, { - "__id__": 2144 + "__id__": 2196 }, { - "__id__": 2146 + "__id__": 2198 }, { - "__id__": 2148 + "__id__": 2200 }, { - "__id__": 2150 + "__id__": 2202 }, { - "__id__": 2152 + "__id__": 2204 }, { - "__id__": 2154 + "__id__": 2206 }, { - "__id__": 2156 + "__id__": 2208 } ], "_prefab": { - "__id__": 2158 + "__id__": 2210 }, "_lpos": { "__type__": "cc.Vec3", @@ -37421,34 +37424,34 @@ "__id__": 2026 }, { - "__id__": 2052 + "__id__": 2055 }, { - "__id__": 2081 + "__id__": 2087 }, { - "__id__": 2107 + "__id__": 2116 } ], "_active": true, "_components": [ { - "__id__": 2135 + "__id__": 2147 }, { - "__id__": 2137 + "__id__": 2149 }, { - "__id__": 2139 + "__id__": 2151 } ], "_prefab": { - "__id__": 2141 + "__id__": 2153 }, "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 100, + "y": 55, "z": 0 }, "_lrot": { @@ -37550,6 +37553,12 @@ }, { "__id__": 2050 + }, + { + "__id__": 2052 + }, + { + "__id__": 2053 } ], "removedComponents": [] @@ -37581,7 +37590,7 @@ "value": { "__type__": "cc.Vec3", "x": -270, - "y": -100, + "y": 0, "z": 0 } }, @@ -37792,6 +37801,41 @@ "1diBHwI3BLsrW9ouEzlrJW" ] }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 2035 + }, + "propertyPath": [ + "_anchorPoint" + ], + "value": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 2054 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "8cNgawRaBANJHCmdHLH75E" + ] + }, { "__type__": "cc.Node", "_objFlags": 0, @@ -37799,14 +37843,14 @@ "__id__": 2025 }, "_prefab": { - "__id__": 2053 + "__id__": 2056 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 2052 + "__id__": 2055 }, "asset": { "__uuid__": "99b1fd19-5e71-4e63-9682-d82b23244510", @@ -37814,7 +37858,7 @@ }, "fileId": "cfWG6+EKVJ3IlHCuz5Pa35", "instance": { - "__id__": 2054 + "__id__": 2057 }, "targetOverrides": null }, @@ -37827,29 +37871,23 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 2055 - }, - { - "__id__": 2057 - }, { "__id__": 2058 }, - { - "__id__": 2059 - }, { "__id__": 2060 }, + { + "__id__": 2061 + }, { "__id__": 2062 }, { - "__id__": 2064 + "__id__": 2063 }, { - "__id__": 2066 + "__id__": 2065 }, { "__id__": 2067 @@ -37858,7 +37896,7 @@ "__id__": 2069 }, { - "__id__": 2071 + "__id__": 2070 }, { "__id__": 2072 @@ -37867,13 +37905,25 @@ "__id__": 2074 }, { - "__id__": 2076 + "__id__": 2075 }, { "__id__": 2077 }, { "__id__": 2079 + }, + { + "__id__": 2080 + }, + { + "__id__": 2082 + }, + { + "__id__": 2084 + }, + { + "__id__": 2085 } ], "removedComponents": [] @@ -37881,7 +37931,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2056 + "__id__": 2059 }, "propertyPath": [ "_name" @@ -37897,7 +37947,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2056 + "__id__": 2059 }, "propertyPath": [ "_lpos" @@ -37905,14 +37955,14 @@ "value": { "__type__": "cc.Vec3", "x": -90, - "y": -100, + "y": 0, "z": 0 } }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2056 + "__id__": 2059 }, "propertyPath": [ "_lrot" @@ -37928,7 +37978,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2056 + "__id__": 2059 }, "propertyPath": [ "_euler" @@ -37943,7 +37993,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2061 + "__id__": 2064 }, "propertyPath": [ "_contentSize" @@ -37963,7 +38013,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2063 + "__id__": 2066 }, "propertyPath": [ "_contentSize" @@ -37983,7 +38033,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2065 + "__id__": 2068 }, "propertyPath": [ "_active" @@ -37999,7 +38049,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2065 + "__id__": 2068 }, "propertyPath": [ "_lpos" @@ -38014,7 +38064,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2068 + "__id__": 2071 }, "propertyPath": [ "_contentSize" @@ -38034,7 +38084,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2070 + "__id__": 2073 }, "propertyPath": [ "_spriteFrame" @@ -38053,7 +38103,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2070 + "__id__": 2073 }, "propertyPath": [ "_atlas" @@ -38066,7 +38116,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2073 + "__id__": 2076 }, "propertyPath": [ "_contentSize" @@ -38086,7 +38136,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2075 + "__id__": 2078 }, "propertyPath": [ "_spriteFrame" @@ -38105,7 +38155,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2075 + "__id__": 2078 }, "propertyPath": [ "_atlas" @@ -38118,7 +38168,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2078 + "__id__": 2081 }, "propertyPath": [ "_string" @@ -38134,7 +38184,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2080 + "__id__": 2083 }, "propertyPath": [ "_string" @@ -38147,6 +38197,41 @@ "1diBHwI3BLsrW9ouEzlrJW" ] }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 2064 + }, + "propertyPath": [ + "_anchorPoint" + ], + "value": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 2086 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "8cNgawRaBANJHCmdHLH75E" + ] + }, { "__type__": "cc.Node", "_objFlags": 0, @@ -38154,14 +38239,14 @@ "__id__": 2025 }, "_prefab": { - "__id__": 2082 + "__id__": 2088 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 2081 + "__id__": 2087 }, "asset": { "__uuid__": "99b1fd19-5e71-4e63-9682-d82b23244510", @@ -38169,7 +38254,7 @@ }, "fileId": "cfWG6+EKVJ3IlHCuz5Pa35", "instance": { - "__id__": 2083 + "__id__": 2089 }, "targetOverrides": null }, @@ -38183,26 +38268,17 @@ "mountedComponents": [], "propertyOverrides": [ { - "__id__": 2084 + "__id__": 2090 }, { - "__id__": 2086 - }, - { - "__id__": 2087 - }, - { - "__id__": 2088 - }, - { - "__id__": 2089 - }, - { - "__id__": 2091 + "__id__": 2092 }, { "__id__": 2093 }, + { + "__id__": 2094 + }, { "__id__": 2095 }, @@ -38210,19 +38286,34 @@ "__id__": 2097 }, { - "__id__": 2098 + "__id__": 2099 }, { - "__id__": 2100 - }, - { - "__id__": 2102 + "__id__": 2101 }, { "__id__": 2103 }, { - "__id__": 2105 + "__id__": 2104 + }, + { + "__id__": 2106 + }, + { + "__id__": 2108 + }, + { + "__id__": 2109 + }, + { + "__id__": 2111 + }, + { + "__id__": 2113 + }, + { + "__id__": 2114 } ], "removedComponents": [] @@ -38230,7 +38321,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2085 + "__id__": 2091 }, "propertyPath": [ "_name" @@ -38246,7 +38337,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2085 + "__id__": 2091 }, "propertyPath": [ "_lpos" @@ -38254,14 +38345,14 @@ "value": { "__type__": "cc.Vec3", "x": 90, - "y": -100, + "y": 0, "z": 0 } }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2085 + "__id__": 2091 }, "propertyPath": [ "_lrot" @@ -38277,7 +38368,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2085 + "__id__": 2091 }, "propertyPath": [ "_euler" @@ -38292,7 +38383,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2090 + "__id__": 2096 }, "propertyPath": [ "_contentSize" @@ -38312,7 +38403,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2092 + "__id__": 2098 }, "propertyPath": [ "_contentSize" @@ -38332,7 +38423,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2094 + "__id__": 2100 }, "propertyPath": [ "_contentSize" @@ -38352,7 +38443,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2096 + "__id__": 2102 }, "propertyPath": [ "_spriteFrame" @@ -38371,7 +38462,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2096 + "__id__": 2102 }, "propertyPath": [ "_atlas" @@ -38384,7 +38475,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2099 + "__id__": 2105 }, "propertyPath": [ "_contentSize" @@ -38404,7 +38495,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2101 + "__id__": 2107 }, "propertyPath": [ "_spriteFrame" @@ -38423,7 +38514,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2101 + "__id__": 2107 }, "propertyPath": [ "_atlas" @@ -38436,7 +38527,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2104 + "__id__": 2110 }, "propertyPath": [ "_string" @@ -38452,7 +38543,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2106 + "__id__": 2112 }, "propertyPath": [ "_string" @@ -38465,6 +38556,41 @@ "1diBHwI3BLsrW9ouEzlrJW" ] }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 2096 + }, + "propertyPath": [ + "_anchorPoint" + ], + "value": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 2115 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "8cNgawRaBANJHCmdHLH75E" + ] + }, { "__type__": "cc.Node", "_objFlags": 0, @@ -38472,14 +38598,14 @@ "__id__": 2025 }, "_prefab": { - "__id__": 2108 + "__id__": 2117 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 2107 + "__id__": 2116 }, "asset": { "__uuid__": "99b1fd19-5e71-4e63-9682-d82b23244510", @@ -38487,7 +38613,7 @@ }, "fileId": "cfWG6+EKVJ3IlHCuz5Pa35", "instance": { - "__id__": 2109 + "__id__": 2118 }, "targetOverrides": null }, @@ -38500,30 +38626,15 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 2110 - }, - { - "__id__": 2112 - }, - { - "__id__": 2113 - }, - { - "__id__": 2114 - }, - { - "__id__": 2115 - }, - { - "__id__": 2117 - }, { "__id__": 2119 }, { "__id__": 2121 }, + { + "__id__": 2122 + }, { "__id__": 2123 }, @@ -38537,13 +38648,34 @@ "__id__": 2128 }, { - "__id__": 2129 + "__id__": 2130 }, { - "__id__": 2131 + "__id__": 2132 }, { "__id__": 2133 + }, + { + "__id__": 2135 + }, + { + "__id__": 2137 + }, + { + "__id__": 2138 + }, + { + "__id__": 2140 + }, + { + "__id__": 2142 + }, + { + "__id__": 2144 + }, + { + "__id__": 2145 } ], "removedComponents": [] @@ -38551,7 +38683,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2111 + "__id__": 2120 }, "propertyPath": [ "_name" @@ -38567,7 +38699,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2111 + "__id__": 2120 }, "propertyPath": [ "_lpos" @@ -38575,14 +38707,14 @@ "value": { "__type__": "cc.Vec3", "x": 270, - "y": -100, + "y": 0, "z": 0 } }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2111 + "__id__": 2120 }, "propertyPath": [ "_lrot" @@ -38598,7 +38730,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2111 + "__id__": 2120 }, "propertyPath": [ "_euler" @@ -38613,7 +38745,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2116 + "__id__": 2125 }, "propertyPath": [ "_contentSize" @@ -38633,7 +38765,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2118 + "__id__": 2127 }, "propertyPath": [ "_contentSize" @@ -38653,7 +38785,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2120 + "__id__": 2129 }, "propertyPath": [ "_contentSize" @@ -38673,7 +38805,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2122 + "__id__": 2131 }, "propertyPath": [ "_spriteFrame" @@ -38692,7 +38824,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2122 + "__id__": 2131 }, "propertyPath": [ "_atlas" @@ -38705,7 +38837,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2125 + "__id__": 2134 }, "propertyPath": [ "_contentSize" @@ -38725,7 +38857,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2127 + "__id__": 2136 }, "propertyPath": [ "_spriteFrame" @@ -38744,7 +38876,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2127 + "__id__": 2136 }, "propertyPath": [ "_atlas" @@ -38757,7 +38889,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2130 + "__id__": 2139 }, "propertyPath": [ "_string" @@ -38773,7 +38905,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2132 + "__id__": 2141 }, "propertyPath": [ "_string" @@ -38789,7 +38921,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 2134 + "__id__": 2143 }, "propertyPath": [ "_contentSize" @@ -38806,6 +38938,41 @@ "ccA41JDOhKgqbiLsCpXiwO" ] }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 2125 + }, + "propertyPath": [ + "_anchorPoint" + ], + "value": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 2146 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "8cNgawRaBANJHCmdHLH75E" + ] + }, { "__type__": "cc.UITransform", "_name": "", @@ -38816,12 +38983,12 @@ }, "_enabled": true, "__prefab": { - "__id__": 2136 + "__id__": 2148 }, "_contentSize": { "__type__": "cc.Size", "width": 720, - "height": 200 + "height": 110 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -38844,7 +39011,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 2138 + "__id__": 2150 }, "_alignFlags": 44, "_target": null, @@ -38880,7 +39047,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 2140 + "__id__": 2152 }, "_resizeMode": 0, "_layoutType": 1, @@ -38921,6 +39088,889 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, + { + "__type__": "cc.Node", + "_name": "nock", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 2155 + }, + { + "__id__": 2165 + }, + { + "__id__": 2175 + } + ], + "_active": false, + "_components": [ + { + "__id__": 2185 + }, + { + "__id__": 2187 + }, + { + "__id__": 2189 + }, + { + "__id__": 2191 + } + ], + "_prefab": { + "__id__": 2193 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 90, + "y": 54.9, + "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": "Node", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2154 + }, + "_children": [ + { + "__id__": 2156 + } + ], + "_active": true, + "_components": [ + { + "__id__": 2162 + } + ], + "_prefab": { + "__id__": 2164 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -180, + "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_Lock03", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2155 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2157 + }, + { + "__id__": 2159 + } + ], + "_prefab": { + "__id__": 2161 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2156 + }, + "_enabled": true, + "__prefab": { + "__id__": 2158 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 71, + "height": 93 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c7GpqInKdFvLIGhSCUoiL1" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2156 + }, + "_enabled": true, + "__prefab": { + "__id__": 2160 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@cebb2", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "76bju1BfhPQ5fGs5YSZ4Mc" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c5LM81fJJE8IzO5rPbvbEh", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2155 + }, + "_enabled": true, + "__prefab": { + "__id__": 2163 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 180, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "53ToDx229LwYsvTsuAycGq" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "fbI6HDeIdEBLRS6m21Rt4q", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Node-001", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2154 + }, + "_children": [ + { + "__id__": 2166 + } + ], + "_active": true, + "_components": [ + { + "__id__": 2172 + } + ], + "_prefab": { + "__id__": 2174 + }, + "_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_Lock03", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2165 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2167 + }, + { + "__id__": 2169 + } + ], + "_prefab": { + "__id__": 2171 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2166 + }, + "_enabled": true, + "__prefab": { + "__id__": 2168 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 71, + "height": 93 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "dfLeYTBJdDPJRp7nC0m1tp" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2166 + }, + "_enabled": true, + "__prefab": { + "__id__": 2170 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@cebb2", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "dbh8KwGRdJqr9KWPbAA62C" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "24Fif53w1JLpjjJExuUJIm", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2165 + }, + "_enabled": true, + "__prefab": { + "__id__": 2173 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 180, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "68Ko+H9kVO+7lBZ6ygmDWw" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d7EV80YEVIZ6CuM6BbYVyw", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Node-002", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2154 + }, + "_children": [ + { + "__id__": 2176 + } + ], + "_active": true, + "_components": [ + { + "__id__": 2182 + } + ], + "_prefab": { + "__id__": 2184 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 180, + "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_Lock03", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2175 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2177 + }, + { + "__id__": 2179 + } + ], + "_prefab": { + "__id__": 2181 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2176 + }, + "_enabled": true, + "__prefab": { + "__id__": 2178 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 71, + "height": 93 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "78EqNBiNxH456eE2mHcZ/S" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2176 + }, + "_enabled": true, + "__prefab": { + "__id__": 2180 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@cebb2", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5ff9ZukoJNTb1VYrsDQrnK" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "3dt4qr4m9KoK+CgQYeGac/", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2175 + }, + "_enabled": true, + "__prefab": { + "__id__": 2183 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 180, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "7b0DI0j/9Kza2Mdf6r6cnH" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "2dj+6vHgRLo48NCpKHZdiT", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2154 + }, + "_enabled": true, + "__prefab": { + "__id__": 2186 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 540, + "height": 110 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "24y70+HhpFYZLg6Hole/JA" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2154 + }, + "_enabled": true, + "__prefab": { + "__id__": 2188 + }, + "_alignFlags": 44, + "_target": null, + "_left": 180, + "_right": 0, + "_top": 0, + "_bottom": -0.1, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "df4JfUm0hNmL/+zIrrAUI6" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2154 + }, + "_enabled": true, + "__prefab": { + "__id__": 2190 + }, + "_resizeMode": 0, + "_layoutType": 1, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 0, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "670X6D/PlNbbwx7ckoD5Cv" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2154 + }, + "_enabled": true, + "__prefab": { + "__id__": 2192 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5c6xUWiQJMLKD1UwutY+w+" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f2dJEADYJKX4Jrio0vaeZ0", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.UITransform", "_name": "", @@ -38931,7 +39981,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 2143 + "__id__": 2195 }, "_contentSize": { "__type__": "cc.Size", @@ -38959,7 +40009,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 2145 + "__id__": 2197 }, "_alignFlags": 21, "_target": null, @@ -38995,7 +40045,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 2147 + "__id__": 2199 }, "debugMode": false, "showMemoryPanel": true, @@ -39022,7 +40072,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 2149 + "__id__": 2201 }, "cards_node": { "__id__": 155 @@ -39042,6 +40092,9 @@ "cards_chou": { "__id__": 487 }, + "nock_node": { + "__id__": 2154 + }, "showHeros": { "__id__": 2026 }, @@ -39049,13 +40102,13 @@ "__id__": 562 }, "showEquips": { - "__id__": 2052 + "__id__": 2055 }, "closeEquips": { "__id__": 874 }, "showSkills": { - "__id__": 2081 + "__id__": 2087 }, "closeSkills": { "__id__": 1931 @@ -39071,7 +40124,7 @@ "__expectedType__": "cc.Prefab" }, "showShop": { - "__id__": 2107 + "__id__": 2116 }, "closeShop": { "__id__": 1055 @@ -39129,7 +40182,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 2151 + "__id__": 2203 }, "_id": "" }, @@ -39147,7 +40200,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 2153 + "__id__": 2205 }, "debugMode": false, "_id": "" @@ -39166,7 +40219,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 2155 + "__id__": 2207 }, "skill_box": { "__uuid__": "d19cde30-f5d0-47de-a0d5-3a272b696343", @@ -39188,7 +40241,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 2157 + "__id__": 2209 }, "equip_box": { "__uuid__": "66d7902d-2a85-43d5-8cbb-671cc7dbb275", @@ -39213,13 +40266,13 @@ "targetOverrides": [], "nestedPrefabInstanceRoots": [ { - "__id__": 2107 + "__id__": 2116 }, { - "__id__": 2081 + "__id__": 2087 }, { - "__id__": 2052 + "__id__": 2055 }, { "__id__": 2026 diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index 7f3b2837..cc086110 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -8664,7 +8664,9 @@ "__prefab": { "__id__": 391 }, - "home_btn": null, + "home_btn": { + "__id__": 130 + }, "hero_btn": { "__id__": 83 }, diff --git a/assets/script/game/map/MissionCardComp.ts b/assets/script/game/map/MissionCardComp.ts index 29b7aae8..31906f34 100644 --- a/assets/script/game/map/MissionCardComp.ts +++ b/assets/script/game/map/MissionCardComp.ts @@ -103,6 +103,8 @@ export class MissionCardComp extends CCComp { /** 抽卡(刷新)按钮节点 */ @property(Node) cards_chou: Node = null! + @property(Node) + nock_node: Node = null! /** 英雄卡牌池cards_node显示隐藏 */ @property(Node) @@ -175,6 +177,8 @@ export class MissionCardComp extends CCComp { private cardComps: CardComp[] = []; /** 技能卡槽控制器缓存 */ private skillCardComps: SCardComp[] = []; + /** 是否已召唤过英雄(用于控制其他面板按钮是否可点击) */ + private hasCalledHero: boolean = false; /** 已购买装备的 UUID 集合(跨波次保持,防止重复购买) */ private purchasedEquipUuids: Set = new Set(); /** 已购买商品的 UUID 集合(跨波次保持,防止重复购买) */ @@ -296,6 +300,10 @@ export class MissionCardComp extends CCComp { this.purchasedItemUuids.clear(); this.populateShopItems(); + // 重置英雄召唤状态(游戏刚开始时其他面板不可点击) + this.hasCalledHero = false; + this.updatePanelButtonsInteractable(); + // 首次进入准备阶段自动抽取一次技能卡,后续刷新只能通过技能刷新按钮触发 this.initSkillCardsOnce(); @@ -496,14 +504,15 @@ export class MissionCardComp extends CCComp { * 首次进入准备阶段时自动抽取一次技能卡: * - 仅在任务开始时调用一次。 * - 后续抽卡只能通过技能刷新按钮触发。 + * - 游戏刚开始时不激活技能面板(等召唤第一个英雄后才开放)。 */ private initSkillCardsOnce() { if (this.skillCardComps.length === 0) { this.cacheCardComps(); } - // 显示技能卡牌面板 + // 游戏刚开始时不显示技能卡牌面板(等召唤英雄后才开放) if (this.skill_card_node) { - this.skill_card_node.active = true; + this.skill_card_node.active = false; } const cards = this.buildSkillDrawCards(); this.dispatchCardsToSkillSlots(cards); @@ -523,6 +532,11 @@ export class MissionCardComp extends CCComp { */ private onShowSkillsClick() { if (!this.skill_card_node || !this.skill_card_node.isValid) return; + // 未召唤英雄时阻止打开技能面板 + if (!this.hasCalledHero) { + oops.gui.toast("请先召唤一个英雄"); + return; + } oops.audio.playEffect("music/button"); const visible = !this.skill_card_node.active; if (visible) { @@ -555,6 +569,11 @@ export class MissionCardComp extends CCComp { */ private onShowShopClick() { if (!this.shopPanNode || !this.shopPanNode.isValid) return; + // 未召唤英雄时阻止打开商店面板 + if (!this.hasCalledHero) { + oops.gui.toast("请先召唤一个英雄"); + return; + } oops.audio.playEffect("music/button"); const visible = !this.shopPanNode.active; if (visible) { @@ -731,6 +750,12 @@ export class MissionCardComp extends CCComp { const after = this.getAliveHeroCount(); this.updateHeroNumUI(true, after > before); + // 第一次召唤英雄后,开放其他面板按钮 + if (!this.hasCalledHero) { + this.hasCalledHero = true; + this.updatePanelButtonsInteractable(); + } + // 第一次召唤英雄后,关闭guide3 // 注:首个英雄召唤后战斗自动开始(见 MissionComp),不再需要 Guide4 引导点击开始按钮 if (!smc.finish_guides.includes(3)) { @@ -857,6 +882,34 @@ export class MissionCardComp extends CCComp { this.playButtonResetAnim(this.cards_chou); } + /** + * 更新面板按钮的可交互状态。 + * 游戏刚开始时(未召唤英雄),只有英雄面板可打开; + * 召唤第一个英雄后,其他面板才允许点击。 + * 通过 nock_node(阻挡层)控制按钮是否可点击,而非隐藏按钮本身。 + */ + private updatePanelButtonsInteractable() { + const interactable = this.hasCalledHero; + // 技能面板按钮:显示按钮但用 nock_node 阻挡点击 + if (this.showSkills && this.showSkills.isValid) { + this.showSkills.active = true; + const nock = this.showSkills.getChildByName("nock"); + if (nock) nock.active = !interactable; + } + // 装备商店按钮:显示按钮但用 nock_node 阻挡点击 + if (this.showEquips && this.showEquips.isValid) { + this.showEquips.active = true; + const nock = this.showEquips.getChildByName("nock"); + if (nock) nock.active = !interactable; + } + // 商品商店按钮:显示按钮但用 nock_node 阻挡点击 + if (this.showShop && this.showShop.isValid) { + this.showShop.active = true; + const nock = this.showShop.getChildByName("nock"); + if (nock) nock.active = !interactable; + } + } + /** * 关闭所有面板(英雄卡池、技能卡池、装备商店、商品商店)。 * 用于打开新面板前确保同时只显示一个面板。 @@ -944,6 +997,11 @@ export class MissionCardComp extends CCComp { */ private onShowEquipsClick() { if (!this.equipsPanNode || !this.equipsPanNode.isValid) return; + // 未召唤英雄时阻止打开装备面板 + if (!this.hasCalledHero) { + oops.gui.toast("请先召唤一个英雄"); + return; + } oops.audio.playEffect("music/button"); const visible = !this.equipsPanNode.active; if (visible) {