今日提神版本,修复了 上锁门和旋转门并存问题,

This commit is contained in:
COMPUTER\EDY 2025-11-17 17:29:28 +08:00
parent 44f44fa563
commit 23dd3eadf8
4 changed files with 13 additions and 4 deletions

View File

@ -1225,14 +1225,13 @@ export default class MapConroler extends cc.Component {
if (wall[0].getChildByName("wall").getComponent("Wall").special == special) { if (wall[0].getChildByName("wall").getComponent("Wall").special == special) {
wallArray.push(i); wallArray.push(i);
for (let k = 0; k < wall.length; k++) { for (let k = 0; k < wall.length; k++) {
wall[k].getChildByName("wall").getComponent("Wall").special = 0; wall[k].getChildByName("wall").getComponent("Wall").special = wall[k].getChildByName("wall").getComponent("Wall").specialBackup;
wall[k].getChildByName("wall").getComponent("Wall").changeRevolvingWall(); wall[k].getChildByName("wall").getComponent("Wall").changeRevolvingWall();
} }
} }
} }
for (let j = 0; j < wallArray.length; j++) { for (let j = 0; j < wallArray.length; j++) {
if (wallArray[j] < (this.revolvingWallArray.length - 1)) { if (wallArray[j] < (this.revolvingWallArray.length - 1)) {
let wall2 = this.revolvingWallArray[wallArray[j] + 1]; let wall2 = this.revolvingWallArray[wallArray[j] + 1];
for (let k = 0; k < wall2.length; k++) { for (let k = 0; k < wall2.length; k++) {

View File

@ -133,6 +133,7 @@ export default class Wall extends cc.Component {
longAndShort: number[] = []; // 长短变化的门 longAndShort: number[] = []; // 长短变化的门
order: boolean = true; // 顺序门 order: boolean = true; // 顺序门
length: number = 0; // 门的长度 length: number = 0; // 门的长度
specialBackup: any; // 特殊门的备份,但是不备份 旋转门
// LIFE-CYCLE CALLBACKS: // LIFE-CYCLE CALLBACKS:
@ -182,8 +183,15 @@ export default class Wall extends cc.Component {
//this.node.getChildByName("num").getComponent(cc.Label).string = ":" + this.node.parent.zIndex; //this.node.getChildByName("num").getComponent(cc.Label).string = ":" + this.node.parent.zIndex;
} }
if (wall_Info != null) { if (wall_Info != null) {
this.specialBackup = 0;
this.color = this.wall_Info.color; this.color = this.wall_Info.color;
this.special = this.wall_Info.special; this.special = this.wall_Info.special;
if (this.special != WallSpecial. && this.special != WallSpecial.) {
this.specialBackup = this.special;
}
else {
this.special = this.wall_Info.special;
}
this.num = this.wall_Info.num; this.num = this.wall_Info.num;
this.length = this.wall_Info.length; this.length = this.wall_Info.length;
let name2 = "rotate" + this.wall_Info.length; let name2 = "rotate" + this.wall_Info.length;
@ -493,6 +501,7 @@ export default class Wall extends cc.Component {
resetFreeze() { resetFreeze() {
this.special = 0; this.special = 0;
this.specialBackup = 0;
if (this.freezeNode) { if (this.freezeNode) {
cc.fx.AudioManager._instance.playEffect("freezeDoor", null); cc.fx.AudioManager._instance.playEffect("freezeDoor", null);
this.freezeNode.active = false; this.freezeNode.active = false;

View File

@ -399,8 +399,8 @@ var GameTool = {
//关卡上限 //关卡上限
maxLevel() { maxLevel() {
let jg = false; let jg = false;
if (cc.fx.GameConfig.GM_INFO.level > 669) { if (cc.fx.GameConfig.GM_INFO.level > 689) {
cc.fx.GameConfig.GM_INFO.level = 670; cc.fx.GameConfig.GM_INFO.level = 690;
jg = true; jg = true;
} }
return jg; return jg;

View File

@ -43,6 +43,7 @@ export default class Lock extends cc.Component {
} }
else if (this.type == "wall") { else if (this.type == "wall") {
if (this.node.parent) this.node.parent.getChildByName("wall").getComponent("Wall").special = 0; if (this.node.parent) this.node.parent.getChildByName("wall").getComponent("Wall").special = 0;
if (this.node.parent) this.node.parent.getChildByName("wall").getComponent("Wall").specialBackup = 0;
} }
this.node.destroy(); this.node.destroy();
this.node.removeFromParent(); this.node.removeFromParent();