修复BUG
This commit is contained in:
parent
633be864a2
commit
daabd0b7f7
|
@ -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,6 +747,7 @@ 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) {
|
||||||
|
@ -896,8 +897,16 @@ 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;
|
||||||
|
@ -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 })
|
.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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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(true);
|
this.changeState(false);
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user