点击停止逻辑修改
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m27s

This commit is contained in:
TJH 2026-02-25 13:32:32 +08:00
parent 08bcd8faf1
commit c035ac8c54
5 changed files with 44 additions and 28 deletions

View File

@ -392,11 +392,10 @@ export class SlotScene extends Component {
// 滚轮没有开始旋转的时候不能停止 // 滚轮没有开始旋转的时候不能停止
if (!this.slotGame.isScroll()) return; if (!this.slotGame.isScroll()) return;
this.slotBar.manualStop(); if (this.gameState.isFastSpin) return;
this.scheduleOnce(() => { this.slotBar.manualStop();
this.slotGame.manualStop(); this.slotGame.manualStop();
}, 0.3)
} }

View File

@ -626,7 +626,7 @@ export abstract class BaseRoller extends Component {
abstract collectExistingIcons(): void; abstract collectExistingIcons(): void;
abstract manualStopScroll(data: number[]): void; abstract manualStopScroll(data: number[], isExpect: boolean): void;
abstract createLastPage(): void; abstract createLastPage(): void;

View File

@ -266,7 +266,9 @@ export class Roller extends BaseRoller {
* *
* @param data * @param data
*/ */
async manualStopScroll(data: number[]) { async manualStopScroll(data: number[], isExpect: boolean) {
// 693399c17dcc61106f024135_1_1
if (isExpect) {
this.resetInfo(); this.resetInfo();
this._stopData = data; this._stopData = data;
this._info.isManualStop = true; this._info.isManualStop = true;
@ -290,6 +292,21 @@ export class Roller extends BaseRoller {
this.createInitIcons(data); this.createInitIcons(data);
this.changeState(ROLLER_STATE.STOP); 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);
}
}
} }
/** /**

View File

@ -196,7 +196,7 @@ export class RollerManager extends Component {
let stopSpeedData = this._isFastSpin ? [[0, 6000]] : [[0.1, 3500]]; let stopSpeedData = this._isFastSpin ? [[0, 6000]] : [[0.1, 3500]];
if (!this._isFastSpin) { 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) { if (nextStopRollerId != -1) {
@ -570,7 +570,7 @@ export class RollerManager extends Component {
let roller = this.allRollers[i]; let roller = this.allRollers[i];
let rollerCroSymbols = processedCroSymbols[i]; let rollerCroSymbols = processedCroSymbols[i];
roller.setCroSymbols(rollerCroSymbols); roller.setCroSymbols(rollerCroSymbols);
roller.manualStopScroll(stopData) roller.manualStopScroll(stopData, this.checkNextRollerExpect(6, 3))
} }
this.upLayer.resetAndSyncAllSpecials(this); this.upLayer.resetAndSyncAllSpecials(this);

View File

@ -7,7 +7,7 @@ import { PREVIEW } from "cc/env"
const gameId = "rp_11001"; const gameId = "rp_11001";
// let apiaddr = "https://rpgames-api.rpfafafahkdev.com"; // let apiaddr = "https://rpgames-api.rpfafafahkdev.com";
let apiaddr = ""; let apiaddr = "";
let token = "eyJQIjoxMDA5NDksIkUiOjE3NzE5NDI0MjksIlMiOjk5NiwiRCI6InJwXzExMDAxIn0.86Uf4ewuuLubSBEzhNAJlEY8Ag4pMVKVHBqAikAvSYo"; let token = "eyJQIjoxMDA5NDksIkUiOjE3NzIwMjYxNzYsIlMiOjEwMDMsIkQiOiJycF8xMTAwMSJ9.3wfZ318ajoHyaEkAcGF9VKAW6qXko5aTVFw1K1rr478";
let language = "en" let language = "en"
let currency = "THB" let currency = "THB"