1.5版本月卡版本收尾

This commit is contained in:
YZ\249929363 2025-07-25 18:03:03 +08:00
parent ab0185574d
commit c50cac4bed
2 changed files with 5 additions and 1 deletions

View File

@ -604,7 +604,8 @@ export default class Block extends cc.Component {
this.node.active = false; this.node.active = false;
this.node.removeFromParent(); this.node.removeFromParent();
setTimeout(() => { 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(); let gameover = MapConroler._instance.predict_End();
if (gameover == false) { if (gameover == false) {
MapConroler._instance.failLevel("lock"); MapConroler._instance.failLevel("lock");

View File

@ -2839,6 +2839,9 @@ export default class MapConroler extends cc.Component {
predict_End() { predict_End() {
//return true; //return true;
console.log("提前判断游戏结束"); console.log("提前判断游戏结束");
if (this.gameOver || this.gameWin) {
return true;
}
let result = false; let result = false;
for (let i = 0; i < this.blocks.length; i++) { for (let i = 0; i < this.blocks.length; i++) {
//确保方块是可移动状态下再做判断 //确保方块是可移动状态下再做判断