冰冻使用道具修改 魔棒bug
This commit is contained in:
parent
d5ab6e2611
commit
942b2c9dc6
|
@ -598,7 +598,7 @@ export default class Block extends cc.Component {
|
|||
MapConroler._instance.upDoor(tempColor);
|
||||
}, 250);
|
||||
|
||||
MapConroler._instance.nextLevel();
|
||||
MapConroler._instance.nextLevel(1);
|
||||
this.node.active = false;
|
||||
this.node.removeFromParent();
|
||||
setTimeout(() => {
|
||||
|
@ -745,7 +745,7 @@ export default class Block extends cc.Component {
|
|||
|
||||
}
|
||||
//道具魔棒消除
|
||||
eliminate() {
|
||||
eliminate(num?:number) {
|
||||
clearTimeout(this.scheduleCallback2);
|
||||
clearTimeout(this.scheduleCallback);
|
||||
clearTimeout(this.scheduleCallback3);
|
||||
|
@ -787,7 +787,9 @@ export default class Block extends cc.Component {
|
|||
}
|
||||
this.scheduleCallback2 = setTimeout(() => {
|
||||
MapConroler._instance.blockNum -= 1;
|
||||
if (num == 1) {
|
||||
MapConroler._instance.special_Treatment(this.node);
|
||||
}
|
||||
}, 950);
|
||||
this.scheduleCallback2 = setTimeout(() => {
|
||||
//如果方块可以消除
|
||||
|
@ -810,7 +812,7 @@ export default class Block extends cc.Component {
|
|||
this.node.getChildByName("boom").getComponent("Boom").destroyBoom(false);
|
||||
}
|
||||
|
||||
MapConroler._instance.nextLevel();
|
||||
MapConroler._instance.nextLevel(0);
|
||||
this.node.active = false;
|
||||
this.node.removeFromParent();
|
||||
setTimeout(() => {
|
||||
|
@ -940,7 +942,7 @@ export default class Block extends cc.Component {
|
|||
this.node.getChildByName("boom").getComponent("Boom").destroyBoom(false);
|
||||
}
|
||||
|
||||
MapConroler._instance.nextLevel();
|
||||
MapConroler._instance.nextLevel(0);
|
||||
this.node.active = false;
|
||||
this.node.removeFromParent();
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -1551,9 +1551,19 @@ export default class MapConroler extends cc.Component {
|
|||
}
|
||||
|
||||
//判断游戏成功下一关
|
||||
nextLevel() {
|
||||
nextLevel(num: number) {
|
||||
if (num == 1) {
|
||||
this.pause = false;
|
||||
this.openIce();
|
||||
} else {
|
||||
if (this.iceTrue() == true) {
|
||||
this.pause = true;
|
||||
} else {
|
||||
this.pause = false;
|
||||
this.openIce();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.blockNum = this.blocks.length;
|
||||
|
||||
|
@ -1782,7 +1792,7 @@ export default class MapConroler extends cc.Component {
|
|||
}
|
||||
|
||||
this.blockNum = this.blocks.length;
|
||||
if (this.blockNum == 0) this.nextLevel();
|
||||
if (this.blockNum == 0) this.nextLevel(1);
|
||||
|
||||
this.node.parent.parent.getChildByName("Lose").active = false;
|
||||
setTimeout(() => {
|
||||
|
@ -1803,7 +1813,7 @@ export default class MapConroler extends cc.Component {
|
|||
this.add_Time += 20;
|
||||
NumberToImage.getTimeMargin(20, 50, "time_", this.timeLabel)
|
||||
this.blockNum = this.blocks.length;
|
||||
if (this.blockNum == 0) this.nextLevel();
|
||||
if (this.blockNum == 0) this.nextLevel(1);
|
||||
this.node.parent.parent.getChildByName("Lose").active = false;
|
||||
setTimeout(() => {
|
||||
this.reviewState = false;
|
||||
|
@ -2746,7 +2756,7 @@ export default class MapConroler extends cc.Component {
|
|||
}
|
||||
if (nomalArray.length > 1) {
|
||||
nomalArray = cc.fx.GameTool.shuffleArray(nomalArray);
|
||||
nomalArray[0].getComponent("Block").eliminate();
|
||||
nomalArray[0].getComponent("Block").eliminate(1);
|
||||
let time = 0;
|
||||
if (nomalArray[0].getComponent("Block").type == 1 || nomalArray[0].getComponent("Block").type == 9) {
|
||||
time = 200;
|
||||
|
@ -2764,7 +2774,7 @@ export default class MapConroler extends cc.Component {
|
|||
// }
|
||||
}
|
||||
else if (nomalArray.length == 1) {
|
||||
nomalArray[0].getComponent("Block").eliminate();
|
||||
nomalArray[0].getComponent("Block").eliminate(1);
|
||||
let time = 0;
|
||||
if (nomalArray[0].getComponent("Block").type == 1 || nomalArray[0].getComponent("Block").type == 9) {
|
||||
time = 200;
|
||||
|
@ -2792,7 +2802,7 @@ export default class MapConroler extends cc.Component {
|
|||
if (this.loackArray.length != 0) {
|
||||
for (let i = 0; i < this.loackArray.length; i++) {
|
||||
// console.log("没有普通快,魔法消除一个带锁块");
|
||||
this.loackArray[i].getComponent("Block").eliminate();
|
||||
this.loackArray[i].getComponent("Block").eliminate(1);
|
||||
count -= 1;
|
||||
if (count == 0) {
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user