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