Compare commits

..

No commits in common. "517607aaa2d4a7a07ae373f8c257d42578d261cb" and "c515fcb147cb0a24606d6794e746c8883cc0ea00" have entirely different histories.

3 changed files with 7 additions and 13 deletions

View File

@ -473,7 +473,7 @@ export default class Block extends cc.Component {
if (jg >= 0) { if (jg >= 0) {
this.over = true; this.over = true;
// MapConroler._instance.changeState(true); MapConroler._instance.changeState(true);
this.removeBoxCollider(); this.removeBoxCollider();
this.removeMapBlock(); this.removeMapBlock();
this.removeAction(jg, type); this.removeAction(jg, type);
@ -747,7 +747,6 @@ export default class Block extends cc.Component {
eliminate() { eliminate() {
clearTimeout(this.scheduleCallback2); clearTimeout(this.scheduleCallback2);
clearTimeout(this.scheduleCallback); clearTimeout(this.scheduleCallback);
let self = this;
//锤子状态消失 //锤子状态消失
MapConroler._instance.pause = true; MapConroler._instance.pause = true;
if (MapConroler._instance.ishammer == true) { if (MapConroler._instance.ishammer == true) {
@ -897,16 +896,8 @@ export default class Block extends cc.Component {
tim = time2 tim = time2
} }
if (MapConroler._instance.hammer == true) MapConroler._instance.hammer = false; 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(() => { this.scheduleCallback2 = setTimeout(() => {
//如果方块可以消除 //如果方块可以消除
MapConroler._instance.blockNum -= 1; MapConroler._instance.blockNum -= 1;
MapConroler._instance.special_Treatment(this.node); MapConroler._instance.special_Treatment(this.node);
var self = this; var self = this;
@ -921,6 +912,10 @@ export default class Block extends cc.Component {
.to(0.1, { position: pos, scaleX: scaleX > 0 ? 1 : -1, scaleY: scaleY > 0 ? 1 : -1 }) .to(0.1, { position: pos, scaleX: scaleX > 0 ? 1 : -1, scaleY: scaleY > 0 ? 1 : -1 })
.start(); .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.) { else if (self.type == BlockType.) {
this.node.getChildByName("boom").getComponent("Boom").destroyBoom(false); 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.blocks.splice(i, 1);
} }
} }
this.changeState(true);
} }
judgeWin(number) { judgeWin(number) {
@ -1756,7 +1756,7 @@ export default class MapConroler extends cc.Component {
cc.fx.GameConfig.GM_INFO.reviewBoom += 1; cc.fx.GameConfig.GM_INFO.reviewBoom += 1;
} }
else if (data.type == "lock") { else if (data.type == "lock") {
this.changeState(false); this.changeState(true);
if (cc.fx.GameConfig.GM_INFO.reviewDoor < 2) if (cc.fx.GameConfig.GM_INFO.reviewDoor < 2)
cc.fx.GameConfig.GM_INFO.reviewDoor += 1; cc.fx.GameConfig.GM_INFO.reviewDoor += 1;
} }

View File

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