diff --git a/assets/Script/Block.ts b/assets/Script/Block.ts index 568f441..fecb8a8 100644 --- a/assets/Script/Block.ts +++ b/assets/Script/Block.ts @@ -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); } diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index 5c165a5..4205741 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -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; } diff --git a/assets/Script/prop/Boom.ts b/assets/Script/prop/Boom.ts index c8f2d2e..b41e87a 100644 --- a/assets/Script/prop/Boom.ts +++ b/assets/Script/prop/Boom.ts @@ -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(); }