Commit 7ed69a67 authored by wjf's avatar wjf

l

parent 58fd7a01
......@@ -166,8 +166,8 @@ export default class MainScene extends Scene {
* 判断连通的状态
* 1表示存在小列连通到大列,从右往左遍历
* 2表示存在大列连通到小烈,从左往右遍历
* 3表示都有,遍历两边,down大,从右先
* 4表示都有,遍历两边,down小,从左先
* 3表示都有,遍历两边,down比up大,从右先
* 4表示都有,遍历两边,down比up小,从左先
*/
connectState: number = 2;
//皮肤上的
......@@ -482,7 +482,7 @@ export default class MainScene extends Scene {
this.generateIndexs = Tool.setGenerateLats(this.lattices, this.chapterData.map.generateLats || [])
var downMax: number = 0;
var downMin: number = Tool.colNum - 1;
var upMax: number = 0;
var hasSmallToBig: boolean;
var hasBigToSmall: boolean;
//联通口
......@@ -494,6 +494,8 @@ export default class MainScene extends Scene {
var colUp = Tool.indexToRc(connectedLat[0])[1];
var colDown = Tool.indexToRc(connectedLat[1])[1];
downMax = Math.max(downMax, colDown);
upMax = Math.max(upMax, colUp);
if (colUp > colDown) {
hasBigToSmall = true;
}
......@@ -503,10 +505,14 @@ export default class MainScene extends Scene {
}
//1表示存在小列连通到大列,从右往左遍历
//2表示存在大列连通到小烈,从左往右遍历
//3表示都有,遍历两边,down大,从右先
//4表示都有,遍历两边,down小,从左先
//3表示都有,遍历两边,down比up大,从右先
//4表示都有,遍历两边,down比up小,从左先
if (hasBigToSmall && hasSmallToBig) {
if (downMax > upMax) {
this.connectState = 3;
} else {
this.connectState = 4;
}
}
else if (hasBigToSmall) {
this.connectState = 2;
......@@ -1058,7 +1064,7 @@ export default class MainScene extends Scene {
if (/*!this.fallVerMark ||*/ Tool.judgeOutOne(this.emptys, this.lattices)) {
// this.fallVerMark = true;
var anis = this.fallVerticalEx();
anis = anis.concat(this.fallVerticalEx())
// anis = anis.concat(this.fallVerticalEx())
// anis = anis.concat(this.fallSkewEx())
if (!anis.length) {
anis = this.fallSkewEx()
......@@ -1146,8 +1152,8 @@ export default class MainScene extends Scene {
fallVerticalEx() {
//1表示存在小列连通到大列,从右往左遍历
//2表示存在大列连通到小烈,从左往右遍历
//3表示都有,遍历两边,down大,从右先
//4表示都有,遍历两边,down小,从左先
//3表示都有,遍历两边,down比up大,从右先
//4表示都有,遍历两边,down比up小,从左先
var anis: FallAniData[] = []
let operation = (m) => {
//同一列,先原有的填满,再查是否有生成口
......@@ -1210,20 +1216,20 @@ export default class MainScene extends Scene {
}
}
}
if (this.connectState == 1) {
for (var m = Tool.colNum; m >= 0; m++)operation(m)
}
else if (this.connectState == 2) {
// if (this.connectState == 1) {
// for (var m = Tool.colNum; m >= 0; m++)operation(m)
// }
// else if (this.connectState == 2) {
for (var m = 0; m < Tool.colNum; m++) operation(m)
}
else if (this.connectState == 3) {
for (var m = Tool.colNum; m >= 0; m++) operation(m);
for (var m = 0; m < Tool.colNum; m++) operation(m);
}
else if (this.connectState == 4) {
for (var m = 0; m < Tool.colNum; m++) operation(m);
for (var m = Tool.colNum; m >= 0; m++) operation(m);
}
// }
// else if (this.connectState == 3) {
// for (var m = Tool.colNum; m >= 0; m++) operation(m);
// for (var m = 0; m < Tool.colNum; m++) operation(m);
// }
// else if (this.connectState == 4) {
// for (var m = 0; m < Tool.colNum; m++) operation(m);
// for (var m = Tool.colNum; m >= 0; m++) operation(m);
// }
return anis;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment