From 6dbf031768cee23960ada5624e1737ac7f77bff6 Mon Sep 17 00:00:00 2001 From: walkpan Date: Mon, 5 Jan 2026 21:49:17 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=BB=E5=8A=A1=E5=8D=A1=E7=89=87):?= =?UTF-8?q?=20=E4=BD=BF=E7=94=A8close=E6=96=B9=E6=B3=95=E6=9B=BF=E4=BB=A3?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=AE=BE=E7=BD=AEnode.active?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将直接设置node.active改为调用close方法,提高代码可维护性和一致性 --- assets/script/game/common/config/ExpSet.ts.meta | 9 --------- assets/script/game/map/MissionCardComp.ts | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) delete mode 100644 assets/script/game/common/config/ExpSet.ts.meta diff --git a/assets/script/game/common/config/ExpSet.ts.meta b/assets/script/game/common/config/ExpSet.ts.meta deleted file mode 100644 index 72f1f80e..00000000 --- a/assets/script/game/common/config/ExpSet.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.24", - "importer": "typescript", - "imported": true, - "uuid": "f1d3b21c-7d12-4c9b-95f9-934191e97018", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/map/MissionCardComp.ts b/assets/script/game/map/MissionCardComp.ts index 7b9c8e12..caaad453 100644 --- a/assets/script/game/map/MissionCardComp.ts +++ b/assets/script/game/map/MissionCardComp.ts @@ -263,7 +263,7 @@ export class MissionCardComp extends CCComp { if (this.card4.active && !this.purchasedSlots[4]) allPurchased = false; if (allPurchased) { - this.node.active = false; + this.close(); } return; } @@ -304,7 +304,7 @@ export class MissionCardComp extends CCComp { oops.message.dispatchEvent(GameEvent.CallFriend, { uuid: selectedData.uuid }); } // 后续扩展其他类型事件 - this.node.active = false; + this.close(); }) .start(); }