From 273273a10ecc6450a246b9dc976fcf9b7eb26e85 Mon Sep 17 00:00:00 2001 From: TJH Date: Thu, 25 Dec 2025 17:43:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=89=E8=90=BD=E6=97=B6=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Game/scripts/SlotGame.ts | 18 +++++++++++++----- assets/Game/scripts/SlotScene.ts | 9 +++++---- assets/Game/scripts/game/BaseRoller.ts | 2 +- assets/Game/scripts/game/Roller.ts | 17 +++++++++++++++-- assets/Game/scripts/game/RollerManager.ts | 4 ++-- 5 files changed, 36 insertions(+), 14 deletions(-) diff --git a/assets/Game/scripts/SlotGame.ts b/assets/Game/scripts/SlotGame.ts index 00ec9c0..d1fd54e 100644 --- a/assets/Game/scripts/SlotGame.ts +++ b/assets/Game/scripts/SlotGame.ts @@ -562,19 +562,27 @@ export class SlotGame extends Component { this.rollerManager.createNewIconTop(createDatas, CroSymbols); } + // iconFallDown_Pan() { + // this.rollerManager.iconFallDown(this.spinData, true); + // } // icon掉落的逻辑 - iconFallDown() { + iconFallDown_PanOut() { + //pan内的块先掉落 + //消除掉落时已有三个scatter,触发延时一会儿,以及心跳声 if (this.rollerManager.checkNextRollerExpect(6, 3)) { AudioManager.instance.playSFX('Appear_Scatter_Sound_elimin', 1, true) + this.rollerManager.iconFallDown(this.spinData, true); this.scheduleOnce(() => { AudioManager.instance.stopAllSFX() this.setWaysCount(this.spinData.Symbol.WaysNum); - this.rollerManager.iconFallDown(this.spinData); - }, 2) + this.rollerManager.iconFallDown(this.spinData, false); + }, 2.5) } else { - this.setWaysCount(this.spinData.Symbol.WaysNum); - this.rollerManager.iconFallDown(this.spinData); + this.scheduleOnce(() => { + this.setWaysCount(this.spinData.Symbol.WaysNum); + this.rollerManager.iconFallDown(this.spinData, false); + }, 0.5) } } diff --git a/assets/Game/scripts/SlotScene.ts b/assets/Game/scripts/SlotScene.ts index 7708c45..6d3de1f 100644 --- a/assets/Game/scripts/SlotScene.ts +++ b/assets/Game/scripts/SlotScene.ts @@ -581,11 +581,15 @@ export class SlotScene extends Component { this.slotGame.getNewMulti(this.gameState.isInFreeSpin, this.spinData.WinInfo.MultPos) // 处理数据 + this.spinData = this.spinInfo.Data; // 改变图标框和图标 this.slotGame.changeIconAndFrameType(this.spinData); + // 创建新图标 this.slotGame.createNewIconTop(this.spinData); + // this.slotGame.iconFallDown_Pan(); + } catch (error) { this.isErr = true let errCode = parseInt(error.message.split("#")[0]); @@ -609,10 +613,7 @@ export class SlotScene extends Component { onIconsCreated() { // let delay = (this.spinData.WinInfo && this.spinData.WinInfo.MultPos) ? 1 : 0 - this.scheduleOnce(() => { - this.slotGame.iconFallDown(); - - }, 0.5) + this.slotGame.iconFallDown_PanOut(); } onIconsFallen() { diff --git a/assets/Game/scripts/game/BaseRoller.ts b/assets/Game/scripts/game/BaseRoller.ts index 66ecfe2..9749bd9 100644 --- a/assets/Game/scripts/game/BaseRoller.ts +++ b/assets/Game/scripts/game/BaseRoller.ts @@ -653,5 +653,5 @@ export abstract class BaseRoller extends Component { abstract createNewIconTop(createDatas: number[][], CroSymbols: any): void; - abstract iconFallDown(data: number[], CroSymbols: any): void; + abstract iconFallDown(data: number[], CroSymbols: any, inPan: boolean): void; } \ No newline at end of file diff --git a/assets/Game/scripts/game/Roller.ts b/assets/Game/scripts/game/Roller.ts index c84eff1..ec34ae8 100644 --- a/assets/Game/scripts/game/Roller.ts +++ b/assets/Game/scripts/game/Roller.ts @@ -811,7 +811,7 @@ export class Roller extends BaseRoller { /** icon进行掉落移动 */ - iconFallDown(data: number[], CroSymbols: any) { + iconFallDown(data: number[], CroSymbols: any, inPan: boolean) { let updates = []; let sortNewIconStartPos = this.getNewIconsStartPos(data, CroSymbols); let sortIcons = this.getSortIcons(); @@ -819,7 +819,17 @@ export class Roller extends BaseRoller { let newStartPos = sortNewIconStartPos[i]; let oldIcon = sortIcons[i]; let oldIconStartPos = oldIcon.startPos; + if (inPan) { + if (oldIconStartPos < 0) { + continue + } + } + // else { + // if (oldIconStartPos >= 0) { + // continue + // } + // } if (oldIconStartPos === newStartPos) { continue; @@ -891,7 +901,10 @@ export class Roller extends BaseRoller { // 在所有图标都完成掉落后触发事件 this.scheduleOnce(() => { - this.node.emit(ROLLER_EVENT.ICON_FALLEN, this._rollerId); + if (!inPan) { + this.node.emit(ROLLER_EVENT.ICON_FALLEN, this._rollerId); + + } }, totalFallTime + 0.1); // 添加一点额外时间确保所有动画完成 } diff --git a/assets/Game/scripts/game/RollerManager.ts b/assets/Game/scripts/game/RollerManager.ts index 03907de..86f5c3d 100644 --- a/assets/Game/scripts/game/RollerManager.ts +++ b/assets/Game/scripts/game/RollerManager.ts @@ -769,7 +769,7 @@ export class RollerManager extends Component { }) } - iconFallDown(data: GameData) { + iconFallDown(data: GameData, inPan: boolean) { this._spinData = data; this._resultStopData = []; this._fallenRollerCount = 0; // 重置计数器 @@ -785,7 +785,7 @@ export class RollerManager extends Component { let rollerCroSymbols = processedCroSymbols[index]; roller.setCroSymbols(rollerCroSymbols); this.scheduleOnce(() => { - roller.iconFallDown(stopData, rollerCroSymbols) + roller.iconFallDown(stopData, rollerCroSymbols,inPan) }, 0.03 * index) })