From 317a50043909aa3dd1336121294ed9e29780868a Mon Sep 17 00:00:00 2001 From: panFD Date: Thu, 10 Sep 2026 14:12:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B0=86=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E7=9F=B3=E6=9B=BF=E6=8D=A2=E4=B8=BA=E9=93=B6=E5=B8=81=E4=BD=9C?= =?UTF-8?q?=E4=B8=BA=E5=8D=A1=E7=89=8C=E5=88=B7=E6=96=B0=E6=B6=88=E8=80=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 重构全局配置,移除刷新石相关定义,新增银币刷新消耗常量 2. 新增局外持久货币银币的数据结构与管理逻辑 3. 重构卡牌刷新经济系统,统一使用银币进行刷新消耗 4. 更新UI显示与事件通知,适配银币系统变更 5. 调整清屏奖励逻辑,将刷新石奖励改为金币奖励 --- assets/resources/gui/element/mission.prefab | 1877 +++++++++++++++-- assets/resources/gui/element/top.prefab | 2 +- .../script/game/common/SingletonModuleComp.ts | 23 +- assets/script/game/common/config/GameEvent.ts | 2 +- assets/script/game/common/config/GameSet.ts | 5 +- assets/script/game/map/BattleBannerComp.ts | 4 +- assets/script/game/map/MissionCardComp.ts | 124 +- assets/script/game/map/MissionComp.ts | 4 +- assets/script/game/map/MissionEconomy.ts | 65 +- 9 files changed, 1763 insertions(+), 343 deletions(-) diff --git a/assets/resources/gui/element/mission.prefab b/assets/resources/gui/element/mission.prefab index 24df023a..acac62e5 100644 --- a/assets/resources/gui/element/mission.prefab +++ b/assets/resources/gui/element/mission.prefab @@ -31,41 +31,41 @@ "__id__": 131 }, { - "__id__": 229 + "__id__": 240 }, { - "__id__": 251 + "__id__": 262 } ], "_active": true, "_components": [ { - "__id__": 295 + "__id__": 306 }, { - "__id__": 297 + "__id__": 308 }, { - "__id__": 299 + "__id__": 310 }, { - "__id__": 301 + "__id__": 312 }, { - "__id__": 303 + "__id__": 364 }, { - "__id__": 305 + "__id__": 366 }, { - "__id__": 307 + "__id__": 368 }, { - "__id__": 309 + "__id__": 370 } ], "_prefab": { - "__id__": 311 + "__id__": 372 }, "_lpos": { "__type__": "cc.Vec3", @@ -3056,20 +3056,20 @@ "_active": true, "_components": [ { - "__id__": 220 + "__id__": 231 }, { - "__id__": 222 + "__id__": 233 }, { - "__id__": 224 + "__id__": 235 }, { - "__id__": 226 + "__id__": 237 } ], "_prefab": { - "__id__": 228 + "__id__": 239 }, "_lpos": { "__type__": "cc.Vec3", @@ -3742,26 +3742,26 @@ "__id__": 159 }, { - "__id__": 187 + "__id__": 198 } ], "_active": true, "_components": [ { - "__id__": 211 + "__id__": 222 }, { - "__id__": 213 + "__id__": 224 }, { - "__id__": 215 + "__id__": 226 }, { - "__id__": 217 + "__id__": 228 } ], "_prefab": { - "__id__": 219 + "__id__": 230 }, "_lpos": { "__type__": "cc.Vec3", @@ -3824,30 +3824,13 @@ "prefabRootNode": { "__id__": 1 }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ + "mountedChildren": [ { "__id__": 162 - }, - { - "__id__": 164 - }, - { - "__id__": 165 - }, - { - "__id__": 166 - }, - { - "__id__": 167 - }, - { - "__id__": 169 - }, - { - "__id__": 170 - }, + } + ], + "mountedComponents": [], + "propertyOverrides": [ { "__id__": 172 }, @@ -3857,6 +3840,9 @@ { "__id__": 175 }, + { + "__id__": 176 + }, { "__id__": 177 }, @@ -3864,33 +3850,55 @@ "__id__": 179 }, { - "__id__": 181 + "__id__": 180 }, { "__id__": 182 }, { "__id__": 184 - } - ], - "removedComponents": [ + }, { "__id__": 185 }, { - "__id__": 186 + "__id__": 187 + }, + { + "__id__": 189 + }, + { + "__id__": 191 + }, + { + "__id__": 192 + }, + { + "__id__": 194 + }, + { + "__id__": 195 + } + ], + "removedComponents": [ + { + "__id__": 196 + }, + { + "__id__": 197 } ] }, { - "__type__": "CCPropertyOverrideInfo", + "__type__": "cc.MountedChildrenInfo", "targetInfo": { "__id__": 163 }, - "propertyPath": [ - "_name" - ], - "value": "refresh" + "nodes": [ + { + "__id__": 164 + } + ] }, { "__type__": "cc.TargetInfo", @@ -3898,10 +3906,80 @@ "60RuUkpjBAGoLk3z4xlHcF" ] }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 159 + }, + "_prefab": { + "__id__": 165 + }, + "__editorExtras__": { + "mountedRoot": { + "__id__": 159 + } + } + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 164 + }, + "asset": { + "__uuid__": "86a3c4cd-71c7-4502-b713-65f0ace7912a", + "__expectedType__": "cc.Prefab" + }, + "fileId": "d3jYvT7whFS5scQFZeO5AK", + "instance": { + "__id__": 166 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "acpFmCJjJGkbHi17sKnZlN", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 167 + }, + { + "__id__": 169 + }, + { + "__id__": 170 + }, + { + "__id__": 171 + } + ], + "removedComponents": [] + }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 163 + "__id__": 168 + }, + "propertyPath": [ + "_name" + ], + "value": "smalltip" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "d3jYvT7whFS5scQFZeO5AK" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 168 }, "propertyPath": [ "_lpos" @@ -3909,14 +3987,14 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 0.117999999999995, + "y": 88.192, "z": 0 } }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 163 + "__id__": 168 }, "propertyPath": [ "_lrot" @@ -3932,7 +4010,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 163 + "__id__": 168 }, "propertyPath": [ "_euler" @@ -3947,7 +4025,69 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 168 + "__id__": 173 + }, + "propertyPath": [ + "_name" + ], + "value": "refresh" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "60RuUkpjBAGoLk3z4xlHcF" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 173 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0.117999999999995, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 173 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 173 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 178 }, "propertyPath": [ "_spriteFrame" @@ -3966,7 +4106,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 168 + "__id__": 178 }, "propertyPath": [ "_atlas" @@ -3979,12 +4119,12 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 171 + "__id__": 181 }, "propertyPath": [ "_active" ], - "value": false + "value": true }, { "__type__": "cc.TargetInfo", @@ -3995,7 +4135,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 173 + "__id__": 183 }, "propertyPath": [ "_lpos" @@ -4016,7 +4156,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 171 + "__id__": 181 }, "propertyPath": [ "_lpos" @@ -4024,14 +4164,14 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 2.75, + "y": 17.75, "z": 0 } }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 176 + "__id__": 186 }, "propertyPath": [ "_lpos" @@ -4052,7 +4192,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 178 + "__id__": 188 }, "propertyPath": [ "_contentSize" @@ -4072,12 +4212,12 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 180 + "__id__": 190 }, "propertyPath": [ "_top" ], - "value": -8.2625 + "value": 6.737500000000001 }, { "__type__": "cc.TargetInfo", @@ -4088,17 +4228,17 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 180 + "__id__": 190 }, "propertyPath": [ "_bottom" ], - "value": -7.237500000000001 + "value": 7.762499999999999 }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 183 + "__id__": 193 }, "propertyPath": [ "_spriteFrame" @@ -4117,7 +4257,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 183 + "__id__": 193 }, "propertyPath": [ "_atlas" @@ -4127,6 +4267,16 @@ "__expectedType__": "cc.SpriteAtlas" } }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 183 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, { "__type__": "cc.TargetInfo", "localID": [ @@ -4146,14 +4296,14 @@ "__id__": 158 }, "_prefab": { - "__id__": 188 + "__id__": 199 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 187 + "__id__": 198 }, "asset": { "__uuid__": "506d0f89-1cf1-4c3b-be47-a3abaf3695e8", @@ -4161,7 +4311,7 @@ }, "fileId": "60RuUkpjBAGoLk3z4xlHcF", "instance": { - "__id__": 189 + "__id__": 200 }, "targetOverrides": null }, @@ -4174,27 +4324,6 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 190 - }, - { - "__id__": 192 - }, - { - "__id__": 193 - }, - { - "__id__": 194 - }, - { - "__id__": 195 - }, - { - "__id__": 197 - }, - { - "__id__": 199 - }, { "__id__": 201 }, @@ -4204,26 +4333,47 @@ { "__id__": 204 }, + { + "__id__": 205 + }, { "__id__": 206 }, { "__id__": 208 + }, + { + "__id__": 210 + }, + { + "__id__": 212 + }, + { + "__id__": 214 + }, + { + "__id__": 215 + }, + { + "__id__": 217 + }, + { + "__id__": 219 } ], "removedComponents": [ { - "__id__": 209 + "__id__": 220 }, { - "__id__": 210 + "__id__": 221 } ] }, { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 191 + "__id__": 202 }, "propertyPath": [ "_name" @@ -4239,7 +4389,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 191 + "__id__": 202 }, "propertyPath": [ "_lpos" @@ -4254,7 +4404,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 191 + "__id__": 202 }, "propertyPath": [ "_lrot" @@ -4270,7 +4420,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 191 + "__id__": 202 }, "propertyPath": [ "_euler" @@ -4285,7 +4435,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 196 + "__id__": 207 }, "propertyPath": [ "_active" @@ -4301,7 +4451,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 198 + "__id__": 209 }, "propertyPath": [ "_lpos" @@ -4322,7 +4472,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 200 + "__id__": 211 }, "propertyPath": [ "_contentSize" @@ -4342,7 +4492,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 202 + "__id__": 213 }, "propertyPath": [ "_top" @@ -4358,7 +4508,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 202 + "__id__": 213 }, "propertyPath": [ "_bottom" @@ -4368,7 +4518,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 205 + "__id__": 216 }, "propertyPath": [ "_string" @@ -4384,7 +4534,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 207 + "__id__": 218 }, "propertyPath": [ "_contentSize" @@ -4404,7 +4554,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 191 + "__id__": 202 }, "propertyPath": [ "_active" @@ -4433,7 +4583,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 212 + "__id__": 223 }, "_contentSize": { "__type__": "cc.Size", @@ -4461,7 +4611,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 214 + "__id__": 225 }, "_alignFlags": 42, "_target": null, @@ -4497,7 +4647,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 216 + "__id__": 227 }, "_resizeMode": 1, "_layoutType": 1, @@ -4535,7 +4685,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 218 + "__id__": 229 }, "_alignFlags": 0, "_target": null, @@ -4584,7 +4734,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 221 + "__id__": 232 }, "_contentSize": { "__type__": "cc.Size", @@ -4612,7 +4762,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 223 + "__id__": 234 }, "_alignFlags": 45, "_target": null, @@ -4648,7 +4798,7 @@ }, "_enabled": false, "__prefab": { - "__id__": 225 + "__id__": 236 }, "_resizeMode": 1, "_layoutType": 1, @@ -4686,7 +4836,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 227 + "__id__": 238 }, "_id": "" }, @@ -4717,23 +4867,23 @@ }, "_children": [ { - "__id__": 230 + "__id__": 241 }, { - "__id__": 236 + "__id__": 247 } ], "_active": true, "_components": [ { - "__id__": 246 + "__id__": 257 }, { - "__id__": 248 + "__id__": 259 } ], "_prefab": { - "__id__": 250 + "__id__": 261 }, "_lpos": { "__type__": "cc.Vec3", @@ -4770,20 +4920,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 229 + "__id__": 240 }, "_children": [], "_active": true, "_components": [ { - "__id__": 231 + "__id__": 242 }, { - "__id__": 233 + "__id__": 244 } ], "_prefab": { - "__id__": 235 + "__id__": 246 }, "_lpos": { "__type__": "cc.Vec3", @@ -4820,11 +4970,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 230 + "__id__": 241 }, "_enabled": true, "__prefab": { - "__id__": 232 + "__id__": 243 }, "_contentSize": { "__type__": "cc.Size", @@ -4848,11 +4998,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 230 + "__id__": 241 }, "_enabled": true, "__prefab": { - "__id__": 234 + "__id__": 245 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -4906,26 +5056,26 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 229 + "__id__": 240 }, "_children": [], "_active": true, "_components": [ { - "__id__": 237 + "__id__": 248 }, { - "__id__": 239 + "__id__": 250 }, { - "__id__": 241 + "__id__": 252 }, { - "__id__": 243 + "__id__": 254 } ], "_prefab": { - "__id__": 245 + "__id__": 256 }, "_lpos": { "__type__": "cc.Vec3", @@ -4962,11 +5112,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 236 + "__id__": 247 }, "_enabled": true, "__prefab": { - "__id__": 238 + "__id__": 249 }, "_contentSize": { "__type__": "cc.Size", @@ -4990,11 +5140,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 236 + "__id__": 247 }, "_enabled": true, "__prefab": { - "__id__": 240 + "__id__": 251 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5058,11 +5208,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 236 + "__id__": 247 }, "_enabled": true, "__prefab": { - "__id__": 242 + "__id__": 253 }, "_params": [], "_dataID": "", @@ -5078,11 +5228,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 236 + "__id__": 247 }, "_enabled": true, "__prefab": { - "__id__": 244 + "__id__": 255 }, "_alignFlags": 45, "_target": null, @@ -5127,11 +5277,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 229 + "__id__": 240 }, "_enabled": true, "__prefab": { - "__id__": 247 + "__id__": 258 }, "_contentSize": { "__type__": "cc.Size", @@ -5155,11 +5305,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 229 + "__id__": 240 }, "_enabled": true, "__prefab": { - "__id__": 249 + "__id__": 260 }, "_alignFlags": 1, "_target": null, @@ -5208,26 +5358,26 @@ }, "_children": [ { - "__id__": 252 + "__id__": 263 }, { - "__id__": 268 + "__id__": 279 }, { - "__id__": 278 + "__id__": 289 } ], "_active": true, "_components": [ { - "__id__": 290 + "__id__": 301 }, { - "__id__": 292 + "__id__": 303 } ], "_prefab": { - "__id__": 294 + "__id__": 305 }, "_lpos": { "__type__": "cc.Vec3", @@ -5264,24 +5414,24 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 251 + "__id__": 262 }, "_children": [ { - "__id__": 253 + "__id__": 264 }, { - "__id__": 259 + "__id__": 270 } ], "_active": false, "_components": [ { - "__id__": 265 + "__id__": 276 } ], "_prefab": { - "__id__": 267 + "__id__": 278 }, "_lpos": { "__type__": "cc.Vec3", @@ -5318,20 +5468,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 252 + "__id__": 263 }, "_children": [], "_active": true, "_components": [ { - "__id__": 254 + "__id__": 265 }, { - "__id__": 256 + "__id__": 267 } ], "_prefab": { - "__id__": 258 + "__id__": 269 }, "_lpos": { "__type__": "cc.Vec3", @@ -5368,11 +5518,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 253 + "__id__": 264 }, "_enabled": true, "__prefab": { - "__id__": 255 + "__id__": 266 }, "_contentSize": { "__type__": "cc.Size", @@ -5396,11 +5546,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 253 + "__id__": 264 }, "_enabled": true, "__prefab": { - "__id__": 257 + "__id__": 268 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5457,20 +5607,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 252 + "__id__": 263 }, "_children": [], "_active": true, "_components": [ { - "__id__": 260 + "__id__": 271 }, { - "__id__": 262 + "__id__": 273 } ], "_prefab": { - "__id__": 264 + "__id__": 275 }, "_lpos": { "__type__": "cc.Vec3", @@ -5507,11 +5657,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 259 + "__id__": 270 }, "_enabled": true, "__prefab": { - "__id__": 261 + "__id__": 272 }, "_contentSize": { "__type__": "cc.Size", @@ -5535,11 +5685,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 259 + "__id__": 270 }, "_enabled": true, "__prefab": { - "__id__": 263 + "__id__": 274 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5616,11 +5766,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 252 + "__id__": 263 }, "_enabled": true, "__prefab": { - "__id__": 266 + "__id__": 277 }, "_contentSize": { "__type__": "cc.Size", @@ -5657,21 +5807,21 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 251 + "__id__": 262 }, "_children": [ { - "__id__": 269 + "__id__": 280 } ], "_active": false, "_components": [ { - "__id__": 275 + "__id__": 286 } ], "_prefab": { - "__id__": 277 + "__id__": 288 }, "_lpos": { "__type__": "cc.Vec3", @@ -5708,20 +5858,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 268 + "__id__": 279 }, "_children": [], "_active": true, "_components": [ { - "__id__": 270 + "__id__": 281 }, { - "__id__": 272 + "__id__": 283 } ], "_prefab": { - "__id__": 274 + "__id__": 285 }, "_lpos": { "__type__": "cc.Vec3", @@ -5758,11 +5908,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 269 + "__id__": 280 }, "_enabled": true, "__prefab": { - "__id__": 271 + "__id__": 282 }, "_contentSize": { "__type__": "cc.Size", @@ -5786,11 +5936,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 269 + "__id__": 280 }, "_enabled": true, "__prefab": { - "__id__": 273 + "__id__": 284 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -5867,11 +6017,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 268 + "__id__": 279 }, "_enabled": true, "__prefab": { - "__id__": 276 + "__id__": 287 }, "_contentSize": { "__type__": "cc.Size", @@ -5908,24 +6058,24 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 251 + "__id__": 262 }, "_children": [ { - "__id__": 279 + "__id__": 290 } ], "_active": true, "_components": [ { - "__id__": 285 + "__id__": 296 }, { - "__id__": 287 + "__id__": 298 } ], "_prefab": { - "__id__": 289 + "__id__": 300 }, "_lpos": { "__type__": "cc.Vec3", @@ -5962,20 +6112,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 278 + "__id__": 289 }, "_children": [], "_active": true, "_components": [ { - "__id__": 280 + "__id__": 291 }, { - "__id__": 282 + "__id__": 293 } ], "_prefab": { - "__id__": 284 + "__id__": 295 }, "_lpos": { "__type__": "cc.Vec3", @@ -6012,11 +6162,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 279 + "__id__": 290 }, "_enabled": true, "__prefab": { - "__id__": 281 + "__id__": 292 }, "_contentSize": { "__type__": "cc.Size", @@ -6040,11 +6190,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 279 + "__id__": 290 }, "_enabled": true, "__prefab": { - "__id__": 283 + "__id__": 294 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -6101,11 +6251,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 278 + "__id__": 289 }, "_enabled": true, "__prefab": { - "__id__": 286 + "__id__": 297 }, "_contentSize": { "__type__": "cc.Size", @@ -6129,11 +6279,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 278 + "__id__": 289 }, "_enabled": true, "__prefab": { - "__id__": 288 + "__id__": 299 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -6210,11 +6360,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 251 + "__id__": 262 }, "_enabled": true, "__prefab": { - "__id__": 291 + "__id__": 302 }, "_contentSize": { "__type__": "cc.Size", @@ -6238,11 +6388,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 251 + "__id__": 262 }, "_enabled": true, "__prefab": { - "__id__": 293 + "__id__": 304 }, "_alignFlags": 41, "_target": null, @@ -6291,7 +6441,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 296 + "__id__": 307 }, "_contentSize": { "__type__": "cc.Size", @@ -6319,7 +6469,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 298 + "__id__": 309 }, "_alignFlags": 21, "_target": null, @@ -6355,16 +6505,16 @@ }, "_enabled": true, "__prefab": { - "__id__": 300 + "__id__": 311 }, "debugMode": false, "showMemoryPanel": true, "start_btn": null, "time_node": { - "__id__": 251 + "__id__": 262 }, "tooltip": { - "__id__": 229 + "__id__": 240 }, "_id": "" }, @@ -6382,7 +6532,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 302 + "__id__": 313 }, "cardPanNode": { "__id__": 131 @@ -6395,7 +6545,7 @@ "__expectedType__": "cc.Prefab" }, "closeCards": { - "__id__": 187 + "__id__": 198 }, "nock_node": null, "showHeros": null, @@ -6422,9 +6572,13 @@ "cards_refresh": { "__id__": 159 }, - "coins_node": null, + "coins_node": { + "__id__": 314 + }, "hero_num_node": null, - "refresh_stone_num_node": null, + "refresh_stone_num_node": { + "__id__": 316 + }, "pickCountLabel": { "__id__": 142 }, @@ -6434,6 +6588,1217 @@ "__type__": "cc.CompPrefabInfo", "fileId": "f9o2hpPnBPmqjcVCGnse3t" }, + { + "__type__": "cc.Node", + "_name": "coin", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": null + }, + "_parent": { + "__id__": 315 + }, + "_children": [ + { + "__id__": 347 + }, + { + "__id__": 353 + } + ], + "_active": false, + "_components": [ + { + "__id__": 359 + }, + { + "__id__": 361 + } + ], + "_prefab": { + "__id__": 363 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 17.75, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Node", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 159 + }, + "_children": [ + { + "__id__": 314 + }, + { + "__id__": 316 + }, + { + "__id__": 334 + } + ], + "_active": true, + "_components": [ + { + "__id__": 340 + }, + { + "__id__": 342 + }, + { + "__id__": 344 + } + ], + "_prefab": { + "__id__": 346 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0.5125000000000028, + "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": "stone", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": null + }, + "_parent": { + "__id__": 315 + }, + "_children": [ + { + "__id__": 317 + }, + { + "__id__": 323 + } + ], + "_active": true, + "_components": [ + { + "__id__": 329 + }, + { + "__id__": 331 + } + ], + "_prefab": { + "__id__": 333 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 17.75, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 316 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 318 + }, + { + "__id__": 320 + } + ], + "_prefab": { + "__id__": 322 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -7.5615234375, + "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__": 317 + }, + "_enabled": true, + "__prefab": { + "__id__": 319 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 27, + "height": 27 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "31GJSeBupAjL6B0JSMWEDn" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 317 + }, + "_enabled": true, + "__prefab": { + "__id__": 321 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@4b5bf", + "__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__": "cb93c900-b440-4571-91d1-7da1636e3d73", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f0Ah1lXhpLIZry/aPq9YzL" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d5mcu1TmRMYpCqlMi96hsO", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "num", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 316 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 324 + }, + { + "__id__": 326 + } + ], + "_prefab": { + "__id__": 328 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 13.5, + "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__": 323 + }, + "_enabled": true, + "__prefab": { + "__id__": 325 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 15.123046875, + "height": 54.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "94OK1DwMRAl7qOBrTxG/i4" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 323 + }, + "_enabled": true, + "__prefab": { + "__id__": 327 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "2", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 20, + "_fontSize": 20, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "38htj7TVBI84FdhXPqZi9Y" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "5aV+d4uupA3430zZytYs+/", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 316 + }, + "_enabled": true, + "__prefab": { + "__id__": 330 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 42.123046875, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "daubq3MHBCvZhVT7CCunA4" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 316 + }, + "_enabled": true, + "__prefab": { + "__id__": 332 + }, + "_resizeMode": 1, + "_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": "867zQklidJAJ9K6dAQWCB6" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "32ZgIQHstCXYwNDGBH6HPk", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": null + }, + "_parent": { + "__id__": 315 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 335 + }, + { + "__id__": 337 + } + ], + "_prefab": { + "__id__": 339 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -15, + "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__": 334 + }, + "_enabled": true, + "__prefab": { + "__id__": 336 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 54, + "height": 35.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a4sqCI1VpI8YJnOwF8QknG" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 334 + }, + "_enabled": true, + "__prefab": { + "__id__": 338 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "刷新", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 25, + "_fontSize": 25, + "_fontFamily": "Arial", + "_lineHeight": 25, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "cea0FpTiVBEprBOaYQFSav" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "28D4tFgVRPwbG9iXo3cRl7", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 315 + }, + "_enabled": true, + "__prefab": { + "__id__": 341 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 65.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a2VyIJeeVKFodz6H9a3PKt" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 315 + }, + "_enabled": true, + "__prefab": { + "__id__": 343 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 6.737500000000001, + "_bottom": 7.762499999999999, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "71o6/V/3VMMZ/CnSZBIkZ0" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 315 + }, + "_enabled": true, + "__prefab": { + "__id__": 345 + }, + "_resizeMode": 1, + "_layoutType": 2, + "_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": "78A6Dkiv9F64eccErjGFxK" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "59HmW0DT5L74QSaNhJXq7r", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 314 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 348 + }, + { + "__id__": 350 + } + ], + "_prefab": { + "__id__": 352 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -7.5615234375, + "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__": 347 + }, + "_enabled": true, + "__prefab": { + "__id__": 349 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 27, + "height": 27 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "39O3Ak8hhKxKF4zeoDUgVQ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 347 + }, + "_enabled": true, + "__prefab": { + "__id__": 351 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@23e64", + "__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__": "cb93c900-b440-4571-91d1-7da1636e3d73", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "fb5HbJnLdPp5vG2ekEjx0W" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "6aPcHyYFpJtqTknWOBQjrH", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "num", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 314 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 354 + }, + { + "__id__": 356 + } + ], + "_prefab": { + "__id__": 358 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 13.5, + "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__": 353 + }, + "_enabled": true, + "__prefab": { + "__id__": 355 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 15.123046875, + "height": 54.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3dJ0AU7pFORpdUaZBM3Z/u" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 353 + }, + "_enabled": true, + "__prefab": { + "__id__": 357 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "2", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 20, + "_fontSize": 20, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9deqZrZeZEEKkvtD7QlGHO" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bfLo+sXdxPSY6pJ+TTshHA", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 314 + }, + "_enabled": true, + "__prefab": { + "__id__": 360 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 42.123046875, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e03E8E9MNHWqlyzsRwdhQj" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 314 + }, + "_enabled": true, + "__prefab": { + "__id__": 362 + }, + "_resizeMode": 1, + "_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": "306oiXmUNKlqXJd/x4wic4" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "deRkP/BNlLX52OUGvpThIO", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "0e186v7IoJEnZ9QdXVZry2W", "_name": "", @@ -6444,7 +7809,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 304 + "__id__": 365 }, "_id": "" }, @@ -6462,7 +7827,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 306 + "__id__": 367 }, "debugMode": false, "_id": "" @@ -6481,7 +7846,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 308 + "__id__": 369 }, "skill_box": { "__uuid__": "d19cde30-f5d0-47de-a0d5-3a272b696343", @@ -6503,7 +7868,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 310 + "__id__": 371 }, "equip_box": { "__uuid__": "66d7902d-2a85-43d5-8cbb-671cc7dbb275", @@ -6528,14 +7893,68 @@ }, "fileId": "f7/N7i8SZFDZ/cm3Iro3X8", "instance": null, - "targetOverrides": [], + "targetOverrides": [ + { + "__id__": 373 + }, + { + "__id__": 375 + } + ], "nestedPrefabInstanceRoots": [ { - "__id__": 187 + "__id__": 198 }, { "__id__": 159 + }, + { + "__id__": 164 } ] + }, + { + "__type__": "cc.TargetOverrideInfo", + "source": { + "__id__": 312 + }, + "sourceInfo": null, + "propertyPath": [ + "refresh_stone_num_node" + ], + "target": { + "__id__": 159 + }, + "targetInfo": { + "__id__": 374 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "32ZgIQHstCXYwNDGBH6HPk" + ] + }, + { + "__type__": "cc.TargetOverrideInfo", + "source": { + "__id__": 312 + }, + "sourceInfo": null, + "propertyPath": [ + "coins_node" + ], + "target": { + "__id__": 159 + }, + "targetInfo": { + "__id__": 376 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "deRkP/BNlLX52OUGvpThIO" + ] } ] \ No newline at end of file diff --git a/assets/resources/gui/element/top.prefab b/assets/resources/gui/element/top.prefab index 002179d0..fb211cac 100644 --- a/assets/resources/gui/element/top.prefab +++ b/assets/resources/gui/element/top.prefab @@ -1628,7 +1628,7 @@ "watchPath": "data.data.gold", "labelType": "cc.Label", "watchPathArr": [ - "data.gold" + "data.silver" ], "_id": "" }, diff --git a/assets/script/game/common/SingletonModuleComp.ts b/assets/script/game/common/SingletonModuleComp.ts index f72c4009..fa2d9082 100644 --- a/assets/script/game/common/SingletonModuleComp.ts +++ b/assets/script/game/common/SingletonModuleComp.ts @@ -21,6 +21,8 @@ export interface GameDate { mission?: number, diamond?: number, gold?: number, + /** 银币:局外持久货币,用于局内刷新英雄卡牌,仅通过日常任务等途径积攒 */ + silver?: number, task?: number, noStop?: boolean, showInfo?: boolean, @@ -110,6 +112,8 @@ export class SingletonModuleComp extends ecs.Comp { mission: 1, diamond: 100, //商店购买 及 双倍奖励资源 gold: 1000, + /** 银币:刷新英雄卡牌专用,每局不重置,仅日常积攒 */ + silver: 0, task: 0, noStop: false, showInfo: true, @@ -157,7 +161,6 @@ export class SingletonModuleComp extends ecs.Comp { level: 1,//关卡等级 max_mission: 4,//最大关卡 coin: 0, - refresh_stone: 0,//刷新石(刷新卡池时优先消耗,不足时消耗金币) time: 15 * 60,//游戏时间 }, scores: { @@ -216,6 +219,7 @@ export class SingletonModuleComp extends ecs.Comp { gold: 0, // 金币数据(MVVM绑定字段,镜像 data.gold) diamond: 0, // 钻石数据(MVVM绑定字段,镜像 data.diamond) + silver: 0, // 银币数据(MVVM绑定字段,镜像 data.silver,刷新卡牌消耗) switch_effect: true, // 音效开关(MVVM绑定字段) switch_music: true, // 音乐开关(MVVM绑定字段) }; @@ -324,6 +328,7 @@ export class SingletonModuleComp extends ecs.Comp { public syncCurrencyToView(): void { this.vmdata.gold = this.data.gold ?? 0; this.vmdata.diamond = this.data.diamond ?? 0; + this.vmdata.silver = this.data.silver ?? 0; } getGameDate() { let data: GameDate = { @@ -363,6 +368,22 @@ export class SingletonModuleComp extends ecs.Comp { return true } + /** + * 变更银币(正数获得 / 负数消耗),以 data 为权威源并镜像到 vmdata。 + * Why: 银币为局外持久货币,仅用于刷新英雄卡牌,日常任务等途径积攒。 + * @param silver 变动量 + * @param is_sync 是否标记脏并触发云端/本地同步 + */ + updateSilver(silver: number, is_sync: boolean = true) { + this.data.silver = Math.max(0, (this.data.silver ?? 0) + silver); + this.vmdata.silver = this.data.silver; + if (is_sync) { + gameDataSync.markDataDirty(); + } + oops.message.dispatchEvent(GameEvent.SILVER_UPDATE) + return true + } + updateSwitchEffect(isOpen: boolean, is_sync: boolean = true) { this.vmdata.switch_effect = isOpen; if (oops.audio) oops.audio.switchEffect = isOpen; diff --git a/assets/script/game/common/config/GameEvent.ts b/assets/script/game/common/config/GameEvent.ts index 304a3fa4..8f3e775c 100644 --- a/assets/script/game/common/config/GameEvent.ts +++ b/assets/script/game/common/config/GameEvent.ts @@ -79,7 +79,7 @@ export enum GameEvent { UpdateMissionGet = "UpdateMissionGet", GlobalAttrChange = "GlobalAttrChange", CoinAdd = "CoinAdd", - RefreshStone = "RefreshStone", // 刷新石数量变更事件 + SILVER_UPDATE = "SILVER_UPDATE", // 银币数量变更事件(刷新卡牌消耗) ShowSmallTip = "ShowSmallTip", CardPoolUpgrade = "CardPoolUpgrade", TriggerSkill = "TriggerSkill", // 瞬间触发施法事件 diff --git a/assets/script/game/common/config/GameSet.ts b/assets/script/game/common/config/GameSet.ts index 2121e205..57002f71 100644 --- a/assets/script/game/common/config/GameSet.ts +++ b/assets/script/game/common/config/GameSet.ts @@ -73,9 +73,8 @@ export enum FightSet { REFRESH_COST = 2, BASE_COST = 5, INIT_COIN = 7, // 初始金币数 - INIT_REFRESH_STONE = 3, // 初始刷新石数量 - /** 单次刷新消耗的刷新石数量 */ - REFRESH_STONE_COST = 1, + /** 单次刷新卡牌消耗的银币数量 */ + SILVER_REFRESH_COST = 1, /** 全局默认闪避率(百分点),heroSet 未配置时生效 */ DEFAULT_DODGE = 15, /** 全局默认命中率(百分点),heroSet 未配置时生效 */ diff --git a/assets/script/game/map/BattleBannerComp.ts b/assets/script/game/map/BattleBannerComp.ts index aa3b15b8..838f5e3c 100644 --- a/assets/script/game/map/BattleBannerComp.ts +++ b/assets/script/game/map/BattleBannerComp.ts @@ -25,6 +25,8 @@ const { ccclass, property } = _decorator; const FAST_CLEAR_COIN = 2; /** 清屏奖励:极速清场(< 50% 时长) */ const ULTRA_CLEAR_COIN = 5; +/** 清屏奖励:全员存活(allAlive)额外金币 */ +const ALL_ALIVE_COIN = 3; /** 连杀分级金币爆发(tier 0/1/2 对应 5/10/20 连杀) */ const COMBO_COIN = [2, 5, 10]; @@ -58,7 +60,7 @@ export class BattleBannerComp extends CCComp { private onWaveClear(event: string, data: { wave: number; clearTime: number; allAlive: boolean; fastClear: number }) { if (data.allAlive) { this.playBanner("Perfect!", new Color(255, 80, 80), 1.2); - MissionEconomy.addRefreshStone(1); + MissionEconomy.addCoin(ALL_ALIVE_COIN); oops.audio.playEffect("music/flash"); } else if (data.fastClear === 2) { this.playBanner("极速清场!", new Color(255, 170, 0), 1.15); diff --git a/assets/script/game/map/MissionCardComp.ts b/assets/script/game/map/MissionCardComp.ts index fb9b9648..5f474ecc 100644 --- a/assets/script/game/map/MissionCardComp.ts +++ b/assets/script/game/map/MissionCardComp.ts @@ -81,8 +81,6 @@ export class MissionCardComp extends CCComp { private readonly buttonPressScale: number = 0.94; /** 按钮弹起缩放(峰值) */ private readonly buttonClickScale: number = 1.06; - /** 抽卡(刷新)费用 */ - refreshCost: number = FightSet.REFRESH_COST; /** 卡牌面板展开/收起动画时长(秒) */ cardsPanelMoveDuration: number = 0.2; @@ -170,7 +168,7 @@ export class MissionCardComp extends CCComp { /** 英雄数量显示节点(含 icon + num 子节点) */ @property(Node) hero_num_node: Node = null! - /** 刷新石数量显示节点(含 icon + num 子节点) */ + /** 银币数量显示节点(含 icon + num 子节点) */ @property(Node) refresh_stone_num_node: Node = null! @@ -330,6 +328,7 @@ export class MissionCardComp extends CCComp { this.resetButtonScale(this.cards_refresh); this.resetPanelOpenCosts(); this.updateCoinAndCostUI(); + this.updateSilverNumUI(); this.updateHeroNumUI(false, false); if (this.node && this.node.isValid) { this.node.active = true; @@ -416,7 +415,7 @@ export class MissionCardComp extends CCComp { this.on("PhasePrepareStart", this.onPhasePrepareStart, this); oops.message.on(GameEvent.CoinAdd, this.onCoinAdd, this); - oops.message.on(GameEvent.RefreshStone, this.onRefreshStone, this); + oops.message.on(GameEvent.SILVER_UPDATE, this.onSilverUpdate, this); oops.message.on(GameEvent.MasterCalled, this.onMasterCalled, this); oops.message.on(GameEvent.HeroDead, this.onHeroDead, this); oops.message.on(GameEvent.HeroSell, this.onHeroSell, this); @@ -477,13 +476,14 @@ export class MissionCardComp extends CCComp { } } - /** 刷新石数量变更:刷新刷新按钮状态/费用显示,并播放数量变化动画 */ - private onRefreshStone(event: string, args: any) { + /** 银币数量变更:刷新银币数值显示 + 刷新按钮状态/费用显示,并播放数量变化动画 */ + private onSilverUpdate(event: string, args: any) { const payload = args ?? event; const v = typeof payload === 'number' ? payload : (payload?.delta ?? payload?.value ?? 0); + this.updateSilverNumUI(); this.updateDrawCostUI(); if (v !== 0) { - this.playRefreshStoneChangeAnim(v > 0); + this.playSilverChangeAnim(v > 0); } } @@ -506,9 +506,10 @@ export class MissionCardComp extends CCComp { * 挂在 showHeros / showEquips / showSkills / showShop 按钮节点(按钮下需预置 smalltip 子节点) * @param text 可选:覆盖气泡文字(默认读 prefab 中配置的文本) */ - public showSmallTip(type: "refresh_coin" | "buy_coin" | "hero_full" | "panel_hero_full" | "panel_equip_full" | "panel_skill_full" | "panel_shop_full", text?: string) { + public showSmallTip(type: "refresh_silver" | "refresh_coin" | "buy_coin" | "hero_full" | "panel_hero_full" | "panel_equip_full" | "panel_skill_full" | "panel_shop_full", text?: string) { let targetNode: Node | null = null; switch (type) { + case "refresh_silver": case "refresh_coin": targetNode = this.cards_refresh; break; @@ -673,7 +674,7 @@ export class MissionCardComp extends CCComp { /** 解除按钮监听,避免节点销毁后回调泄漏 */ private unbindEvents() { oops.message.off(GameEvent.CoinAdd, this.onCoinAdd, this); - oops.message.off(GameEvent.RefreshStone, this.onRefreshStone, this); + oops.message.off(GameEvent.SILVER_UPDATE, this.onSilverUpdate, this); oops.message.off(GameEvent.MasterCalled, this.onMasterCalled, this); oops.message.off(GameEvent.HeroDead, this.onHeroDead, this); oops.message.off(GameEvent.HeroSell, this.onHeroSell, this); @@ -1447,10 +1448,9 @@ export class MissionCardComp extends CCComp { this.playButtonResetAnim(this.skill_refresh); } - /** 装备刷新:扣费后重新抽取 3 张装备展示 */ + /** 装备刷新:扣银币后重新抽取 3 张装备展示 */ private onClickEquipRefresh() { - const cost = MissionEconomy.getRefreshCost(this.refreshCost); - const success = MissionEconomy.executeRefresh(this.refreshCost); + const success = MissionEconomy.executeRefresh(); if (!success) { this.showSmallTip("refresh_coin"); return; @@ -1458,10 +1458,9 @@ export class MissionCardComp extends CCComp { this.populateEquipments(); } - /** 药品刷新:扣费后重新抽取 3 张商品展示 */ + /** 药品刷新:扣银币后重新抽取 3 张商品展示 */ private onClickShopRefresh() { - const cost = MissionEconomy.getRefreshCost(this.refreshCost); - const success = MissionEconomy.executeRefresh(this.refreshCost); + const success = MissionEconomy.executeRefresh(); if (!success) { this.showSmallTip("refresh_coin"); return; @@ -1469,9 +1468,9 @@ export class MissionCardComp extends CCComp { this.populateShopItems(); } - /** 技能刷新:扣费后重新抽取 3 张技能卡展示 */ + /** 技能刷新:扣银币后重新抽取 3 张技能卡展示 */ private onClickSkillRefresh() { - const success = MissionEconomy.executeRefresh(this.refreshCost); + const success = MissionEconomy.executeRefresh(); if (!success) { this.showSmallTip("refresh_coin"); return; @@ -1568,18 +1567,18 @@ export class MissionCardComp extends CCComp { /** * 刷新卡池按钮核心逻辑: - * 1. 检查金币/刷新石是否足够 → 不够则 toast 提示。 - * 2. 扣除费用、播放金币动画。 + * 1. 检查银币是否足够 → 不够则 toast 提示。 + * 2. 扣除银币费用。 * 3. 重新布局槽位 → 从卡池构建 3 张卡 → 分发到槽位(三选一展示)。 */ private onClickDraw() { - const cost = MissionEconomy.getRefreshCost(this.refreshCost); - const success = MissionEconomy.executeRefresh(this.refreshCost); + const cost = MissionEconomy.getSilverRefreshCost(); + const success = MissionEconomy.executeRefresh(); if (!success) { - this.showSmallTip("refresh_coin"); + this.showSmallTip("refresh_silver", "银币不足"); this.updateCoinAndCostUI(); - mLogger.log(this.debugMode, "MissionCardComp", "draw coin not enough", { - currentCoin: MissionEconomy.getCoin(), + mLogger.log(this.debugMode, "MissionCardComp", "draw silver not enough", { + currentSilver: MissionEconomy.getSilver(), cost }); return; @@ -1587,7 +1586,7 @@ export class MissionCardComp extends CCComp { mLogger.log(this.debugMode, "MissionCardComp", "click refresh", { cost, - leftCoin: MissionEconomy.getCoin() + leftSilver: MissionEconomy.getSilver() }); this.layoutCardSlots(); const cards = this.buildDrawCards(); @@ -1626,8 +1625,10 @@ export class MissionCardComp extends CCComp { } // 开局三选一期满后永久隐藏 showHeros(战前限定,不随阶段恢复) this.updateShowHerosVisibility(); - // 刷新所有刷新按钮的费用显示(含刷新石/金币切换与置灰状态) + // 刷新所有刷新按钮的费用显示(含银币置灰状态) this.updateDrawCostUI(); + // 同步银币数量显示(阶段切换时确保数值最新) + this.updateSilverNumUI(); // 显示卡牌面板(默认进入准备阶段时展开,缩放放大到 1,点亮按钮 active 高亮) if (this.cardPanNode && this.cardPanNode.isValid) { this.showCardsPanel(); @@ -1851,17 +1852,17 @@ export class MissionCardComp extends CCComp { } private canDrawCards() { - // 有刷新石时可直接刷新,否则校验金币是否足够 - return MissionEconomy.canRefresh(this.refreshCost); + // 银币足够时才可刷新 + return MissionEconomy.canRefresh(); } private updateDrawCostUI() { - const stones = MissionEconomy.getRefreshStone(); - const stoneCost = MissionEconomy.getRefreshStoneCost(); - this.updateOneRefreshBtnUI(this.cards_refresh, stones, stoneCost); - this.updateOneRefreshBtnUI(this.equip_refresh, stones, stoneCost); - this.updateOneRefreshBtnUI(this.shop_refresh, stones, stoneCost); - this.updateOneRefreshBtnUI(this.skill_refresh, stones, stoneCost); + const silver = MissionEconomy.getSilver(); + const silverCost = MissionEconomy.getSilverRefreshCost(); + this.updateOneRefreshBtnUI(this.cards_refresh, silver, silverCost); + this.updateOneRefreshBtnUI(this.equip_refresh, silver, silverCost); + this.updateOneRefreshBtnUI(this.shop_refresh, silver, silverCost); + this.updateOneRefreshBtnUI(this.skill_refresh, silver, silverCost); } /** @@ -1871,50 +1872,42 @@ export class MissionCardComp extends CCComp { * - 背景 :按钮底图 * - nobg :置灰遮罩,不可刷新时激活 * - Node/ :费用容器,下含 Label + coin + stone - * - coin/ :金币费用(含 num 子节点 Label),刷新石=0 时显示 - * - stone/ :刷新石费用(含 num 子节点 Label),刷新石>0 时显示 + * - coin/ :金币费用(含 num 子节点 Label),银币机制下隐藏 + * - stone/ :银币数量(含 num 子节点 Label),显示当前持有银币数 * * @param btnNode 刷新按钮节点 - * @param stones 当前刷新石数量(外部统一读取,避免 4 次重复访问) - * @param stoneCost 单次刷新消耗的刷新石数量 + * @param silver 当前银币数量(外部统一读取,避免 4 次重复访问) + * @param silverCost 单次刷新消耗的银币数量(仅用于判断是否置灰) */ - private updateOneRefreshBtnUI(btnNode: Node | null, stones: number, stoneCost: number) { + private updateOneRefreshBtnUI(btnNode: Node | null, silver: number, silverCost: number) { if (!btnNode || !btnNode.isValid) return; - // 刷新石足够一次消耗时走刷新石通道,否则走金币通道 - const useStone = stones >= stoneCost; + // 银币足够一次消耗时走银币通道 + const useSilver = silver >= silverCost; - // 置灰遮罩:有刷新石必定可刷新,否则按金币判断 + // 置灰遮罩:银币不足时置灰 const nobg = btnNode.getChildByName("nobg"); if (nobg) { - nobg.active = useStone ? false : !this.canDrawCards(); + nobg.active = !useSilver; } // 费用容器:按钮下的 Node 子节点(统一结构:背景 + Node[Label/coin/stone]) const container = btnNode.getChildByName("Node"); if (!container) return; - // 金币费用节点 + // 金币费用节点:银币机制下隐藏,不再显示金币费用 const coinNode = container.getChildByName("coin"); if (coinNode) { - coinNode.active = !useStone; - if (!useStone) { - const numLabel = coinNode.getChildByName("num")?.getComponent(Label); - if (numLabel) { - numLabel.string = `${MissionEconomy.getRefreshCost(this.refreshCost)}`; - } - } + coinNode.active = false; } - // 刷新石费用节点(显示单次刷新消耗数量) + // 银币费用节点(复用 stone 子节点结构,显示当前持有银币数量) const stoneNode = container.getChildByName("stone"); if (stoneNode) { - stoneNode.active = useStone; - if (useStone) { - const numLabel = stoneNode.getChildByName("num")?.getComponent(Label); - if (numLabel) { - numLabel.string = `${stoneCost}`; - } + stoneNode.active = true; + const numLabel = stoneNode.getChildByName("num")?.getComponent(Label); + if (numLabel) { + numLabel.string = `${silver}`; } } } @@ -1930,6 +1923,17 @@ export class MissionCardComp extends CCComp { } } + /** 刷新银币数量显示(refresh_stone_num_node 下的 num Label),未绑定或节点失效时静默跳过 */ + private updateSilverNumUI() { + if (!this.refresh_stone_num_node || !this.refresh_stone_num_node.isValid) return; + const numNode = this.refresh_stone_num_node.getChildByName("num"); + if (!numNode || !numNode.isValid) return; + const label = numNode.getComponent(Label); + if (label) { + label.string = `${MissionEconomy.getSilver()}`; + } + } + private playCoinChangeAnim(isIncrease: boolean) { if (!this.coins_node || !this.coins_node.isValid) return; const icon = this.coins_node.getChildByName("icon"); @@ -1941,8 +1945,8 @@ export class MissionCardComp extends CCComp { this.playHeroNumNodePop(num, peak); } - /** 刷新石计数变化动画(与金币一致的 icon+num 弹跳) */ - private playRefreshStoneChangeAnim(isIncrease: boolean) { + /** 银币计数变化动画(与金币一致的 icon+num 弹跳) */ + private playSilverChangeAnim(isIncrease: boolean) { if (!this.refresh_stone_num_node || !this.refresh_stone_num_node.isValid) return; const peak = isIncrease ? 1.2 : 1.2; const icon = this.refresh_stone_num_node.getChildByName("icon"); diff --git a/assets/script/game/map/MissionComp.ts b/assets/script/game/map/MissionComp.ts index 8c9eac04..983068ff 100644 --- a/assets/script/game/map/MissionComp.ts +++ b/assets/script/game/map/MissionComp.ts @@ -830,9 +830,7 @@ export class MissionComp extends CCComp { smc.resetScores(); smc.vmdata.mission_data.coin = Math.max(0, Math.floor(FightSet.INIT_COIN)); - // 初始化刷新石数量,并派发事件通知 UI 刷新(MissionStart 早于 data_init,需手动通知) - smc.vmdata.mission_data.refresh_stone = Math.max(0, Math.floor(FightSet.INIT_REFRESH_STONE)); - oops.message.dispatchEvent(GameEvent.RefreshStone, { delta: FightSet.INIT_REFRESH_STONE }); + // 银币为局外持久货币,每局不重置,仅通过日常积攒,无需初始化 // 【评分系统 - 效率分】记录初始获得的金币收入 smc.vmdata.scores.gold_earned += smc.vmdata.mission_data.coin; } diff --git a/assets/script/game/map/MissionEconomy.ts b/assets/script/game/map/MissionEconomy.ts index 7681c779..eb33ae40 100644 --- a/assets/script/game/map/MissionEconomy.ts +++ b/assets/script/game/map/MissionEconomy.ts @@ -39,68 +39,45 @@ export class MissionEconomy { return true; } - /** - * 计算卡牌刷新费用 - * @param baseCost 基础费用,默认为1 - */ - static getRefreshCost(baseCost: number = 1): number { - return Math.floor(Math.max(0, baseCost)); - } - - /** 获取当前刷新石数量 */ - static getRefreshStone(): number { - return Math.max(0, Math.floor(smc.vmdata.mission_data.refresh_stone ?? 0)); + /** 获取当前银币数量(局外持久货币,刷新卡牌消耗) */ + static getSilver(): number { + return Math.max(0, Math.floor(smc.vmdata.silver ?? 0)); } /** - * 增加刷新石 + * 增加银币 * @param amount 增加数量,<=0 时忽略 */ - static addRefreshStone(amount: number) { + static addSilver(amount: number) { if (amount <= 0) return; - amount = Math.floor(amount); - smc.vmdata.mission_data.refresh_stone = this.getRefreshStone() + amount; - - // 发送 UI 更新事件(复用 RefreshStone 事件通知刷新按钮状态刷新) - oops.message.dispatchEvent(GameEvent.RefreshStone, { delta: amount }); + smc.updateSilver(Math.floor(amount)); } - /** 单次刷新消耗的刷新石数量 */ - static getRefreshStoneCost(): number { - return Math.max(1, Math.floor(FightSet.REFRESH_STONE_COST)); + /** 单次刷新消耗的银币数量 */ + static getSilverRefreshCost(): number { + return Math.max(1, Math.floor(FightSet.SILVER_REFRESH_COST)); } /** - * 判断当前是否可以执行一次刷新(刷新石足够或金币足够) + * 判断当前是否可以执行一次刷新(银币足够) */ - static canRefresh(baseCost: number = 1): boolean { - if (this.getRefreshStone() >= this.getRefreshStoneCost()) return true; - return this.getCoin() >= this.getRefreshCost(baseCost); + static canRefresh(): boolean { + return this.getSilver() >= this.getSilverRefreshCost(); } /** * 执行刷新卡牌: - * 1. 刷新石足够时优先扣除 REFRESH_STONE_COST 颗刷新石(不消耗金币)。 - * 2. 刷新石不足时扣除金币(含刷新优惠折扣)。 + * 银币足够时扣除 SILVER_REFRESH_COST 枚银币,否则刷新失败。 + * Why: 英雄卡牌只能银币刷新,不能金币刷新,银币为局外持久货币,靠日常积攒。 */ - static executeRefresh(baseCost: number = 1): boolean { - // 优先消耗刷新石 - const stoneCost = this.getRefreshStoneCost(); - const stones = this.getRefreshStone(); - if (stones >= stoneCost) { - smc.vmdata.mission_data.refresh_stone = stones - stoneCost; - smc.vmdata.scores.refresh_count++; - oops.message.dispatchEvent(GameEvent.RefreshStone, { delta: -stoneCost }); - return true; - } + static executeRefresh(): boolean { + const cost = this.getSilverRefreshCost(); + const silver = this.getSilver(); + if (silver < cost) return false; - // 刷新石不足 → 扣除金币 - const cost = this.getRefreshCost(baseCost); - const success = this.spendCoin(cost); - if (success) { - smc.vmdata.scores.refresh_count++; - } - return success; + smc.updateSilver(-cost); + smc.vmdata.scores.refresh_count++; + return true; } /**