去除符号变化的逻辑
This commit is contained in:
parent
0def2ba2a8
commit
76d29c2f21
@ -311,49 +311,49 @@ export class SlotGame extends Component {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
changeIconAndFrameType(spinData: any) {
|
// changeIconAndFrameType(spinData: any) {
|
||||||
this.spinData = spinData;
|
// this.spinData = spinData;
|
||||||
// 先去找到PanChange当中是否有oldPos,如果没有代表当前icon没有动,就去crossSymbols当中找
|
// // 先去找到PanChange当中是否有oldPos,如果没有代表当前icon没有动,就去crossSymbols当中找
|
||||||
// 初始化changeData数组
|
// // 初始化changeData数组
|
||||||
let changeData = [];
|
// let changeData = [];
|
||||||
let colorChanges = this.spinData.PanChanges.CrossSymbolColorChange
|
// let colorChanges = this.spinData.PanChanges.CrossSymbolColorChange
|
||||||
|
|
||||||
|
|
||||||
// 遍历CrossSymbolColorChange获取颜色变化信息
|
// // 遍历CrossSymbolColorChange获取颜色变化信息
|
||||||
for (let key in this.spinData.PanChanges.CrossSymbolColorChange) {
|
// for (let key in this.spinData.PanChanges.CrossSymbolColorChange) {
|
||||||
let colorChange = this.spinData.PanChanges.CrossSymbolColorChange[key];
|
// let colorChange = this.spinData.PanChanges.CrossSymbolColorChange[key];
|
||||||
let newIndex = colorChange.NewColor;
|
// let newIndex = colorChange.NewColor;
|
||||||
let oldStartPos;
|
// let oldStartPos;
|
||||||
let frameType;
|
// let frameType;
|
||||||
let height;
|
// let height;
|
||||||
|
|
||||||
// 先在CrossSymbolPosChange中查找位置变化
|
// // 先在CrossSymbolPosChange中查找位置变化
|
||||||
if (this.spinData.PanChanges.CrossSymbolPosChange[key]) {
|
// if (this.spinData.PanChanges.CrossSymbolPosChange[key]) {
|
||||||
oldStartPos = this.spinData.PanChanges.CrossSymbolPosChange[key].OldPos[0];
|
// oldStartPos = this.spinData.PanChanges.CrossSymbolPosChange[key].OldPos[0];
|
||||||
}
|
// }
|
||||||
// 如果没找到则在crossSymbols中查找
|
// // 如果没找到则在crossSymbols中查找
|
||||||
else if (this.spinData.CrossSymbols[key]) {
|
// else if (this.spinData.CrossSymbols[key]) {
|
||||||
oldStartPos = this.spinData.CrossSymbols[key].PosFirst;
|
// oldStartPos = this.spinData.CrossSymbols[key].PosFirst;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 从crossSymbols获取frameType和height
|
// // 从crossSymbols获取frameType和height
|
||||||
if (this.spinData.CrossSymbols[key]) {
|
// if (this.spinData.CrossSymbols[key]) {
|
||||||
let symbol = this.spinData.CrossSymbols[key];
|
// let symbol = this.spinData.CrossSymbols[key];
|
||||||
frameType = symbol.FrameType;
|
// frameType = symbol.FrameType;
|
||||||
height = symbol.PosLast - symbol.PosFirst + 1;
|
// height = symbol.PosLast - symbol.PosFirst + 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 添加到changeData数组
|
// // 添加到changeData数组
|
||||||
changeData.push({
|
// changeData.push({
|
||||||
oldStartPos: oldStartPos + 4,
|
// oldStartPos: oldStartPos + 4,
|
||||||
newIndex: newIndex,
|
// newIndex: newIndex,
|
||||||
newFrameType: frameType,
|
// newFrameType: frameType,
|
||||||
lheight: height
|
// lheight: height
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.rollerManager.changeIconAndFrameType(changeData);
|
// this.rollerManager.changeIconAndFrameType(changeData);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 消除创建的逻辑
|
// 消除创建的逻辑
|
||||||
createNewIconTop(spinData: any) {
|
createNewIconTop(spinData: any) {
|
||||||
|
|||||||
@ -527,7 +527,7 @@ export class SlotScene extends Component {
|
|||||||
// 处理数据
|
// 处理数据
|
||||||
this.spinData = this.spinInfo.Data;
|
this.spinData = this.spinInfo.Data;
|
||||||
// 改变图标框和图标
|
// 改变图标框和图标
|
||||||
this.slotGame.changeIconAndFrameType(this.spinData);
|
// this.slotGame.changeIconAndFrameType(this.spinData);
|
||||||
if (this.gameState.isInFreeSpin) {
|
if (this.gameState.isInFreeSpin) {
|
||||||
this.slotGame.playFreeMultiAni();
|
this.slotGame.playFreeMultiAni();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -790,24 +790,24 @@ export class RollerManager extends Component {
|
|||||||
winLayer.active = false;
|
winLayer.active = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
changeIconAndFrameType(panChanges: any[]) {
|
// changeIconAndFrameType(panChanges: any[]) {
|
||||||
let rollerChangePositions: Map<number, any[]> = new Map();
|
// let rollerChangePositions: Map<number, any[]> = new Map();
|
||||||
panChanges.forEach(change => {
|
// panChanges.forEach(change => {
|
||||||
let lx = this.getLx(change.oldStartPos);
|
// let lx = this.getLx(change.oldStartPos);
|
||||||
let ly = this.getLy(change.oldStartPos);
|
// let ly = this.getLy(change.oldStartPos);
|
||||||
// 获取或创建该列的变化位置数组
|
// // 获取或创建该列的变化位置数组
|
||||||
if (!rollerChangePositions.has(lx)) {
|
// if (!rollerChangePositions.has(lx)) {
|
||||||
rollerChangePositions.set(lx, []);
|
// rollerChangePositions.set(lx, []);
|
||||||
}
|
// }
|
||||||
// 将oldStartPos改为ly并添加到对应列的数组中
|
// // 将oldStartPos改为ly并添加到对应列的数组中
|
||||||
change.oldStartPos = ly;
|
// change.oldStartPos = ly;
|
||||||
rollerChangePositions.get(lx).push(change);
|
// rollerChangePositions.get(lx).push(change);
|
||||||
})
|
// })
|
||||||
|
|
||||||
rollerChangePositions.forEach((changes, lx) => {
|
// rollerChangePositions.forEach((changes, lx) => {
|
||||||
this.allRollers[lx].chanegeIconAndFrameType(changes);
|
// this.allRollers[lx].chanegeIconAndFrameType(changes);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
createNewIconTop(createDatas: number[][], spinData: any) {
|
createNewIconTop(createDatas: number[][], spinData: any) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user