修复两个问题,一个是 冰冻没有立即解冻 等动画 导致提前判死了, 第二个问题是 修复 开关门动画被打断后显示和实际状态不一致问题

This commit is contained in:
COMPUTER\EDY 2026-05-14 19:45:52 +08:00
parent df3c574088
commit d028d5ab1c
4 changed files with 27 additions and 5 deletions

View File

@ -1428,7 +1428,7 @@ export default class Block extends cc.Component {
}
}
}
}, 2000);
}, 1200);
}, time * 1000);
@ -2055,7 +2055,7 @@ export default class Block extends cc.Component {
}
}
}
}, 2000);
}, 900);
MapConroler._instance.ismagic = false;
}, 1200);
@ -2267,7 +2267,7 @@ export default class Block extends cc.Component {
}
}
}
}, 2000);
}, 1200);
//如果是锤子状态消除
MapConroler._instance.ishammer = false;

View File

@ -5805,9 +5805,10 @@ export default class MapConroler extends cc.Component {
}
if (jg == true) {
if (wall.node.parent.getChildByName("length").active == true) {
// console.log("普通快:不可通过");
jg = false;
}
// console.log("普通快:可通过");
// console.log("普通快:通过");
}
return jg;
}
@ -5863,6 +5864,7 @@ export default class MapConroler extends cc.Component {
if (this.blockCanMove(this.blocks[i])) {
for (let j = 0; j < this.wall_Pass.length; j++) {
//如果颜色相同
// console.log("判断颜色是否相同", this.wall_Pass[j].color, color);
if (this.wall_Pass[j].color == color && this.wall_Pass[j].node.parent.getChildByName("length").active == false && this.wall_Pass[j].jump != true) {
//星星块特殊判断
if (this.blocks[i].getComponent("Block").type == 5) {

View File

@ -828,6 +828,10 @@ export default class Wall extends cc.Component {
.to(0.3, { scaleX: this.openNode.children[0].scaleX < 0 ? -fill : fill })
.call(() => {
this.leftTween = null; // 动画完成后清除引用
if (this.open == true)
this.openNode.children[0].scaleX = this.openNode.children[0].scaleX < 0 ? -0.01 : 0.01;
else
this.openNode.children[0].scaleX = this.openNode.children[0].scaleX < 0 ? -1 : 1;
})
.start();
@ -836,8 +840,23 @@ export default class Wall extends cc.Component {
.to(0.3, { scaleX: this.openNode.children[1].scaleX < 0 ? -fill : fill })
.call(() => {
this.rightTween = null; // 动画完成后清除引用
if (this.open == true)
this.openNode.children[1].scaleX = this.openNode.children[1].scaleX < 0 ? -0.01 : 0.01;
else
this.openNode.children[1].scaleX = this.openNode.children[1].scaleX < 0 ? -1 : 1;
})
.start();
setTimeout(() => {
if (this.open == true) {
this.openNode.children[1].scaleX = this.openNode.children[1].scaleX < 0 ? -0.01 : 0.01;
this.openNode.children[0].scaleX = this.openNode.children[0].scaleX < 0 ? -0.01 : 0.01;
}
else {
this.openNode.children[1].scaleX = this.openNode.children[1].scaleX < 0 ? -1 : 1;
this.openNode.children[0].scaleX = this.openNode.children[0].scaleX < 0 ? -1 : 1;
}
}, 3100);
}
// ============================================

View File

@ -53,6 +53,7 @@ export default class Freeze extends cc.Component {
cc.fx.GameTool.numberScaleAction(this.node.getChildByName("time"));
// this.node.getChildByName("time").getComponent(cc.Label).string = this.time.toString();
if (this.time <= 0) {
console.log("冰冻结束,解冻");
this.node.getChildByName("bingkuai").active = true;
const skeleton = this.node.getChildByName("bingkuai").getComponent(sp.Skeleton);
skeleton.setAnimation(1, "bingkuai", false);
@ -62,13 +63,13 @@ export default class Freeze extends cc.Component {
.to(0.5, { opacity: 0 })
.start();
cc.fx.AudioManager._instance.playEffect("freezeBlock", null);
if (this.node.parent) this.node.parent.getComponent("Block").resetFreeze();
// this.node.getChildByName("icon").getComponent(cc.Sprite).setMaterial(0,this.freeze);
// this.node.children.forEach(element => {
// element.destroy();
// });
setTimeout(() => {
if (this.node) {
if (this.node.parent) this.node.parent.getComponent("Block").resetFreeze();
this.node.destroy();
this.node.removeFromParent();
}