fix: 调整卡牌使用后回调的执行顺序

确保在清理状态后执行 onCardUsed 回调,避免状态不一致问题
This commit is contained in:
walkpan
2026-03-29 21:55:32 +08:00
parent c114809cc0
commit ec0c9c97f8

View File

@@ -206,9 +206,9 @@ export class CardComp extends CCComp {
leftCoin: this.getMissionCoin()
});
this.playUseDisappearAnim(() => {
this.cardUseComp?.onCardUsed(used);
this.clearAfterUse();
this.isUsing = false;
this.cardUseComp?.onCardUsed(used);
});
return used;
}