diff --git a/assets/Game/Scripts/SlotBar.ts b/assets/Game/Scripts/SlotBar.ts index 7c8c6ec..02b54a7 100644 --- a/assets/Game/Scripts/SlotBar.ts +++ b/assets/Game/Scripts/SlotBar.ts @@ -542,7 +542,8 @@ export class SlotBar extends Component { } private isGetBalance: boolean = false; - async onClickBalance(): Promise { + async onClickBalance(isConfirm = false): Promise { + let delay = isConfirm ? 0 : 1 if (this.isGetBalance) return this.isGetBalance = true; try { @@ -555,7 +556,7 @@ export class SlotBar extends Component { } finally { this.scheduleOnce(() => { this.isGetBalance = false; - }, 1) + }, delay) } } diff --git a/assets/Game/Scripts/SlotScene.ts b/assets/Game/Scripts/SlotScene.ts index db610a5..ebc55a5 100644 --- a/assets/Game/Scripts/SlotScene.ts +++ b/assets/Game/Scripts/SlotScene.ts @@ -222,7 +222,7 @@ export class SlotScene extends Component { if (this.slotBar.getBalance() < (buyType == 1 ? this.slotBar.getBet() * this.gameInfo.BuyMul : (this.isDoubleWin ? this.slotBar.getdisplayBet() : this.slotBar.getBet())) && !this.isFreeSpin && !this.spinInfo.Frb.Ongoing) { //余额不足不经过服务器,在客户端拦截 - this.showErrorTip(2, "", () => { this.slotBar.onClickBalance() }); + this.showErrorTip(2, "", () => { this.slotBar.onClickBalance(true) }); this.handleErrSpin(); return }