refactor(任务卡片): 使用close方法替代直接设置node.active

将直接设置node.active改为调用close方法,提高代码可维护性和一致性
This commit is contained in:
walkpan
2026-01-05 21:49:17 +08:00
parent 9bf8ad2625
commit 6dbf031768
2 changed files with 2 additions and 11 deletions

View File

@@ -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();
}