fix: 调整卡牌使用后回调的执行顺序
确保在清理状态后执行 onCardUsed 回调,避免状态不一致问题
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user