From c035ac8c546ecc1781799714194aa7d719129d8f Mon Sep 17 00:00:00 2001 From: TJH Date: Wed, 25 Feb 2026 13:32:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=81=9C=E6=AD=A2=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Game/scripts/SlotScene.ts | 7 ++- assets/Game/scripts/game/BaseRoller.ts | 2 +- assets/Game/scripts/game/Roller.ts | 57 +++++++++++++++-------- assets/Game/scripts/game/RollerManager.ts | 4 +- assets/Loading/scripts/comm.ts | 2 +- 5 files changed, 44 insertions(+), 28 deletions(-) diff --git a/assets/Game/scripts/SlotScene.ts b/assets/Game/scripts/SlotScene.ts index b9df9b9..61807fd 100644 --- a/assets/Game/scripts/SlotScene.ts +++ b/assets/Game/scripts/SlotScene.ts @@ -392,11 +392,10 @@ export class SlotScene extends Component { // 滚轮没有开始旋转的时候不能停止 if (!this.slotGame.isScroll()) return; - this.slotBar.manualStop(); + if (this.gameState.isFastSpin) return; - this.scheduleOnce(() => { - this.slotGame.manualStop(); - }, 0.3) + this.slotBar.manualStop(); + this.slotGame.manualStop(); } diff --git a/assets/Game/scripts/game/BaseRoller.ts b/assets/Game/scripts/game/BaseRoller.ts index ee5d10c..fe80998 100644 --- a/assets/Game/scripts/game/BaseRoller.ts +++ b/assets/Game/scripts/game/BaseRoller.ts @@ -626,7 +626,7 @@ export abstract class BaseRoller extends Component { abstract collectExistingIcons(): void; - abstract manualStopScroll(data: number[]): void; + abstract manualStopScroll(data: number[], isExpect: boolean): void; abstract createLastPage(): void; diff --git a/assets/Game/scripts/game/Roller.ts b/assets/Game/scripts/game/Roller.ts index 9bde977..83d78d5 100644 --- a/assets/Game/scripts/game/Roller.ts +++ b/assets/Game/scripts/game/Roller.ts @@ -266,30 +266,47 @@ export class Roller extends BaseRoller { * 手动停止滚动 * @param data 停止时的图标数据 */ - async manualStopScroll(data: number[]) { - this.resetInfo(); - this._stopData = data; - this._info.isManualStop = true; - Tween.stopAllByTarget(this._info.speedNode); + async manualStopScroll(data: number[], isExpect: boolean) { + // 693399c17dcc61106f024135_1_1 + if (isExpect) { + this.resetInfo(); + this._stopData = data; + this._info.isManualStop = true; + Tween.stopAllByTarget(this._info.speedNode); - // 回收所有动态图标 - while (this._info.icons.length > 0) { - let icon = this._info.icons.pop(); - this.iconFactory.recycleIcon(icon); - } - - // 回收固定位置图标 - for (let i = 0; i < this.row; i++) { - let icon = this._allIcons.get(this._posToIconKey.get(i)); - if (icon) { - this._allIcons.delete(this._posToIconKey.get(i)); - this._posToIconKey.delete(i); + // 回收所有动态图标 + while (this._info.icons.length > 0) { + let icon = this._info.icons.pop(); this.iconFactory.recycleIcon(icon); } - } - this.createInitIcons(data); - this.changeState(ROLLER_STATE.STOP); + // 回收固定位置图标 + for (let i = 0; i < this.row; i++) { + let icon = this._allIcons.get(this._posToIconKey.get(i)); + if (icon) { + this._allIcons.delete(this._posToIconKey.get(i)); + this._posToIconKey.delete(i); + this.iconFactory.recycleIcon(icon); + } + } + + this.createInitIcons(data); + this.changeState(ROLLER_STATE.STOP); + + } else { + if (this._info.isManualStop) { + return; + } + + this._stopData = data; + this._info.isManualStop = true; + + this._info.speedDataComplete = true; + let stopSpeedData = this._info.isFastSpin ? [[0, 8000]] : [[0.5, 5500]]; + if (this._info.receiveStopData) { + this.stopScrollWork(stopSpeedData); + } + } } /** diff --git a/assets/Game/scripts/game/RollerManager.ts b/assets/Game/scripts/game/RollerManager.ts index 9c7e4c7..35f57c1 100644 --- a/assets/Game/scripts/game/RollerManager.ts +++ b/assets/Game/scripts/game/RollerManager.ts @@ -196,7 +196,7 @@ export class RollerManager extends Component { let stopSpeedData = this._isFastSpin ? [[0, 6000]] : [[0.1, 3500]]; if (!this._isFastSpin) { - stopSpeedData = isExpect ? [[1, 4000], [0.5], [0.1, 2500], [0.5], [0.5, 725]] : [[0.1, 3500]]; + stopSpeedData = isExpect ? [[1, 4000], [0.5], [0.1, 2500], [0.5], [0.5, 725]] : [[this._isManualStop ? 0 : 0.1, 3500]]; } if (nextStopRollerId != -1) { @@ -570,7 +570,7 @@ export class RollerManager extends Component { let roller = this.allRollers[i]; let rollerCroSymbols = processedCroSymbols[i]; roller.setCroSymbols(rollerCroSymbols); - roller.manualStopScroll(stopData) + roller.manualStopScroll(stopData, this.checkNextRollerExpect(6, 3)) } this.upLayer.resetAndSyncAllSpecials(this); diff --git a/assets/Loading/scripts/comm.ts b/assets/Loading/scripts/comm.ts index 610e48d..feb13fc 100644 --- a/assets/Loading/scripts/comm.ts +++ b/assets/Loading/scripts/comm.ts @@ -7,7 +7,7 @@ import { PREVIEW } from "cc/env" const gameId = "rp_11001"; // let apiaddr = "https://rpgames-api.rpfafafahkdev.com"; let apiaddr = ""; -let token = "eyJQIjoxMDA5NDksIkUiOjE3NzE5NDI0MjksIlMiOjk5NiwiRCI6InJwXzExMDAxIn0.86Uf4ewuuLubSBEzhNAJlEY8Ag4pMVKVHBqAikAvSYo"; +let token = "eyJQIjoxMDA5NDksIkUiOjE3NzIwMjYxNzYsIlMiOjEwMDMsIkQiOiJycF8xMTAwMSJ9.3wfZ318ajoHyaEkAcGF9VKAW6qXko5aTVFw1K1rr478"; let language = "en" let currency = "THB"