Commit bdd543d4 authored by huangwenjie's avatar huangwenjie

1

parent 82a944d8
import { PropPanel } from './../../panels/PropPanel';
import { QuitPanel } from './../../panels/QuitPanel';
import { PropOutPanel } from './../../panels/PropOutPanel';
import { showWaiting, hideWaiting } from './../../../module/ctrls/waitingCtrl';
......@@ -452,7 +453,7 @@ export class PlayScene extends Scene {
getTools()
if (!this.isGameWin())
// if (!this.isGameWin())
this.isGameOver()
}, PropType.exchange)
} else if (this.exchangeTargetPool.length = 1) {
......@@ -685,7 +686,7 @@ export class PlayScene extends Scene {
this.removeChild(this.doFilterBtn)
this.filtering = false
this.removeAnis()
if (!this.isGameWin())
// if (!this.isGameWin())
this.isGameOver()
}, 300);
}, PropType.net)
......@@ -817,7 +818,7 @@ export class PlayScene extends Scene {
await this.moveAni(beforeArr)
this.renderBoard()
this.generateOneElement()
if (!this.isGameWin())
// if (!this.isGameWin())
this.isGameOver()
}
}
......@@ -828,7 +829,7 @@ export class PlayScene extends Scene {
await this.moveAni(beforeArr)
this.renderBoard()
this.generateOneElement()
if (!this.isGameWin())
// if (!this.isGameWin())
this.isGameOver()
}
}
......@@ -841,7 +842,7 @@ export class PlayScene extends Scene {
await this.moveAni(beforeArr)
this.renderBoard()
this.generateOneElement()
if (!this.isGameWin())
// if (!this.isGameWin())
this.isGameOver()
}
}
......@@ -852,7 +853,7 @@ export class PlayScene extends Scene {
await this.moveAni(beforeArr)
this.renderBoard()
this.generateOneElement()
if (!this.isGameWin())
// if (!this.isGameWin())
this.isGameOver()
}
}
......@@ -989,7 +990,7 @@ export class PlayScene extends Scene {
gameover() {
// 游戏结束
console.log("游戏结束");
showPanel(PropPanel)
}
isGameWin() {
......@@ -1166,7 +1167,7 @@ export class PlayScene extends Scene {
let addScore = 0
for (let i = 1; i < arr.length; i++) {
if (arr[i] === 0) break
if (arr[i] === arr[i - 1]) {
if (arr[i] === arr[i - 1] && arr[i - 1] < 2048) {
// fromIdx 要改成转换前的idx
// this.moveData[t].push({ "fromValue": arr[i - 1], "toValue": arr[i - 1] * 2, "fromIdx": i, "toIdx": i - 1 })
......
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