点击停止逻辑修改
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m27s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m27s
This commit is contained in:
parent
08bcd8faf1
commit
c035ac8c54
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user