Compare commits

...

2 Commits

Author SHA1 Message Date
YZ\249929363 517607aaa2 Merge branch 'main' of https://git.sparkus.cn/yangzhao/cb 2025-07-30 18:40:01 +08:00
YZ\249929363 daabd0b7f7 修复BUG 2025-07-30 18:39:57 +08:00
3 changed files with 13 additions and 7 deletions

View File

@ -473,7 +473,7 @@ export default class Block extends cc.Component {
if (jg >= 0) {
this.over = true;
MapConroler._instance.changeState(true);
// MapConroler._instance.changeState(true);
this.removeBoxCollider();
this.removeMapBlock();
this.removeAction(jg, type);
@ -747,6 +747,7 @@ export default class Block extends cc.Component {
eliminate() {
clearTimeout(this.scheduleCallback2);
clearTimeout(this.scheduleCallback);
let self = this;
//锤子状态消失
MapConroler._instance.pause = true;
if (MapConroler._instance.ishammer == true) {
@ -896,8 +897,16 @@ export default class Block extends cc.Component {
tim = time2
}
if (MapConroler._instance.hammer == true) MapConroler._instance.hammer = false;
if (self.type == BlockType.) {
self.block_Info.node.getComponent("Block").restoreNomal(self.block_Info.node.getComponent("Block").posX,
self.block_Info.node.getComponent("Block").posY, false);
}
else if (self.type == BlockType.) {
this.node.getChildByName("boom").getComponent("Boom").stopBoom();
}
this.scheduleCallback2 = setTimeout(() => {
//如果方块可以消除
MapConroler._instance.blockNum -= 1;
MapConroler._instance.special_Treatment(this.node);
var self = this;
@ -912,10 +921,6 @@ export default class Block extends cc.Component {
.to(0.1, { position: pos, scaleX: scaleX > 0 ? 1 : -1, scaleY: scaleY > 0 ? 1 : -1 })
.start();
}
else if (self.type == BlockType.) {
self.block_Info.node.getComponent("Block").restoreNomal(self.block_Info.node.getComponent("Block").posX,
self.block_Info.node.getComponent("Block").posY, false);
}
else if (self.type == BlockType.) {
this.node.getChildByName("boom").getComponent("Boom").destroyBoom(false);
}

View File

@ -1524,7 +1524,7 @@ export default class MapConroler extends cc.Component {
this.blocks.splice(i, 1);
}
}
this.changeState(true);
}
judgeWin(number) {
@ -1756,7 +1756,7 @@ export default class MapConroler extends cc.Component {
cc.fx.GameConfig.GM_INFO.reviewBoom += 1;
}
else if (data.type == "lock") {
this.changeState(true);
this.changeState(false);
if (cc.fx.GameConfig.GM_INFO.reviewDoor < 2)
cc.fx.GameConfig.GM_INFO.reviewDoor += 1;
}

View File

@ -45,6 +45,7 @@ export default class Boom extends cc.Component {
this.over = true;
this.unschedule(this.updateTime);
this.node.parent.getComponent("Block").resetFreeze();
this.node.active = false;
this.node.destroy();
}