diff --git a/assets/Script/Block.ts b/assets/Script/Block.ts index 90dc71b..55617ed 100644 --- a/assets/Script/Block.ts +++ b/assets/Script/Block.ts @@ -604,7 +604,8 @@ export default class Block extends cc.Component { this.node.active = false; this.node.removeFromParent(); setTimeout(() => { - if (type == true && MapConroler._instance.openWall.length > 0) { + if (type == true && MapConroler._instance.openWall.length > 0 + && !MapConroler._instance.gameOver && MapConroler._instance.gameWin) { let gameover = MapConroler._instance.predict_End(); if (gameover == false) { MapConroler._instance.failLevel("lock"); diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index 93d4c6c..f742d67 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -2839,6 +2839,9 @@ export default class MapConroler extends cc.Component { predict_End() { //return true; console.log("提前判断游戏结束"); + if (this.gameOver || this.gameWin) { + return true; + } let result = false; for (let i = 0; i < this.blocks.length; i++) { //确保方块是可移动状态下再做判断