fix: 调整卡牌使用后回调的执行顺序
确保在清理状态后执行 onCardUsed 回调,避免状态不一致问题
This commit is contained in:
@@ -206,9 +206,9 @@ export class CardComp extends CCComp {
|
|||||||
leftCoin: this.getMissionCoin()
|
leftCoin: this.getMissionCoin()
|
||||||
});
|
});
|
||||||
this.playUseDisappearAnim(() => {
|
this.playUseDisappearAnim(() => {
|
||||||
this.cardUseComp?.onCardUsed(used);
|
|
||||||
this.clearAfterUse();
|
this.clearAfterUse();
|
||||||
this.isUsing = false;
|
this.isUsing = false;
|
||||||
|
this.cardUseComp?.onCardUsed(used);
|
||||||
});
|
});
|
||||||
return used;
|
return used;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user