更新 ,修复 BUG

This commit is contained in:
COMPUTER\EDY 2025-12-19 10:50:07 +08:00
parent 276a9c5732
commit 92096cfc4e
5 changed files with 87 additions and 80 deletions

View File

@ -1293,58 +1293,6 @@ export default class MapConroler extends cc.Component {
// console.log("排序后的WALL_INFO数组:", this.revolvingWallArray);
}
changeRevolvingWall() {
//没有旋转门,直接不处理
if (this.revolving_state == 0) {
return;
}
// console.log("旋转一次");
//有旋转门,根据旋转门数组,改变旋转门状态,受旋转方向影响
let wallStart = this.revolvingWallArray[0];
let wallArray = [];
let special = 4; if (this.revolving_state == 2) special = 5;
for (let i = 0; i < this.revolvingWallArray.length; i++) {
let wall = this.revolvingWallArray[i];
if (wall[0].getChildByName("wall").getComponent("Wall").special == special) {
wallArray.push(i);
for (let k = 0; k < wall.length; k++) {
wall[k].getChildByName("wall").getComponent("Wall").special = wall[k].getChildByName("wall").getComponent("Wall").specialBackup;
wall[k].getChildByName("wall").getComponent("Wall").changeRevolvingWall();
}
}
}
for (let j = 0; j < wallArray.length; j++) {
if (wallArray[j] < (this.revolvingWallArray.length - 1)) {
let wall2 = this.revolvingWallArray[wallArray[j] + 1];
for (let k = 0; k < wall2.length; k++) {
wall2[k].getChildByName("wall").getComponent("Wall").special = special;
}
this.revolvingWallAction(wallArray[j], wallArray[j] + 1, wall2);
}
else {
let wall3 = wallStart;
for (let k = 0; k < wall3.length; k++) {
wall3[k].getChildByName("wall").getComponent("Wall").special = special;
}
this.revolvingWallAction(wallArray[j], 0, wall3);
}
}
}
changeLongAndShortWall() {
//长短门状态变化
if (this.longAndShortWall.length != 0) {
// cc.fx.AudioManager._instance.playEffect("lockDoor", null);
for (let i = 0; i < this.longAndShortWall.length; i++) {
if (this.longAndShortWall[i].getChildByName("wall").getComponent("Wall").wall_Info.length > 0) {
console.log("执行一次长短变化");
this.longAndShortWall[i].getChildByName("wall").getComponent("Wall").changeLongAndShort();
}
}
}
}
revolvingWallAction(startPos, endPos, wall) {
let startWall = this.revolvingWallArray[startPos][0].getChildByName("revolving");
@ -1671,21 +1619,10 @@ export default class MapConroler extends cc.Component {
changeState(type) {
if (type) {
//开关门的门统一处理
if (this.openWall.length != 0) {
cc.fx.AudioManager._instance.playEffect("lockDoor", null);
for (let i = 0; i < this.openWall.length; i++) {
this.openWall[i].getChildByName("wall").getComponent("Wall").changeLock();
}
this.changeLockWall();
}
//粘合块解锁状态变化
if (this.adhesiveBlock.length != 0) {
for (let i = 0; i < this.adhesiveBlock.length; i++) {
if (this.adhesiveBlock[i])
this.adhesiveBlock[i].getComponent("Block").reduceAdhesive();
}
}
}
this.changeAdhesive();
}
changeFreeze() {
@ -1709,11 +1646,75 @@ export default class MapConroler extends cc.Component {
changeAdhesive() {
if (this.adhesiveBlock.length != 0) {
for (let i = 0; i < this.adhesiveBlock.length; i++) {
if (this.adhesiveBlock[i])
this.adhesiveBlock[i].getComponent("Block").reduceAdhesive();
}
}
}
changeLockWall() {
//开关门的门统一处理
if (this.openWall.length != 0) {
cc.fx.AudioManager._instance.playEffect("lockDoor", null);
for (let i = 0; i < this.openWall.length; i++) {
this.openWall[i].getChildByName("wall").getComponent("Wall").changeLock();
}
}
}
changeRevolvingWall() {
//没有旋转门,直接不处理
if (this.revolving_state == 0) {
return;
}
// console.log("旋转一次");
//有旋转门,根据旋转门数组,改变旋转门状态,受旋转方向影响
let wallStart = this.revolvingWallArray[0];
let wallArray = [];
let special = 4; if (this.revolving_state == 2) special = 5;
for (let i = 0; i < this.revolvingWallArray.length; i++) {
let wall = this.revolvingWallArray[i];
if (wall[0].getChildByName("wall").getComponent("Wall").special == special) {
wallArray.push(i);
for (let k = 0; k < wall.length; k++) {
wall[k].getChildByName("wall").getComponent("Wall").special = wall[k].getChildByName("wall").getComponent("Wall").specialBackup;
wall[k].getChildByName("wall").getComponent("Wall").changeRevolvingWall();
}
}
}
for (let j = 0; j < wallArray.length; j++) {
if (wallArray[j] < (this.revolvingWallArray.length - 1)) {
let wall2 = this.revolvingWallArray[wallArray[j] + 1];
for (let k = 0; k < wall2.length; k++) {
wall2[k].getChildByName("wall").getComponent("Wall").special = special;
}
this.revolvingWallAction(wallArray[j], wallArray[j] + 1, wall2);
}
else {
let wall3 = wallStart;
for (let k = 0; k < wall3.length; k++) {
wall3[k].getChildByName("wall").getComponent("Wall").special = special;
}
this.revolvingWallAction(wallArray[j], 0, wall3);
}
}
}
changeLongAndShortWall() {
//长短门状态变化
if (this.longAndShortWall.length != 0) {
// cc.fx.AudioManager._instance.playEffect("lockDoor", null);
for (let i = 0; i < this.longAndShortWall.length; i++) {
if (this.longAndShortWall[i].getChildByName("wall").getComponent("Wall").wall_Info.length > 0) {
console.log("执行一次长短变化");
this.longAndShortWall[i].getChildByName("wall").getComponent("Wall").changeLongAndShort();
}
}
}
}
//检测是否可以通过门
passWall(jg, wallArray, node) {
let colorArray = [];
@ -2562,16 +2563,22 @@ export default class MapConroler extends cc.Component {
cc.fx.GameConfig.GM_INFO.reviewBoom += 1;
}
else if (data.type == "lock") {
this.changeState(true);
this.changeLockWall();
this.changeRevolvingWall();
this.changeLongAndShortWall();
if (cc.fx.GameConfig.GM_INFO.reviewDoor < 2)
cc.fx.GameConfig.GM_INFO.reviewDoor += 1;
}
else if (data.type == "revolving") {
this.changeLockWall();
this.changeRevolvingWall();
this.changeLongAndShortWall();
if (cc.fx.GameConfig.GM_INFO.reviewRevolving < 2)
cc.fx.GameConfig.GM_INFO.reviewRevolving += 1;
}
else if (data.type == "longAndShort") {
this.changeLockWall();
this.changeRevolvingWall();
this.changeLongAndShortWall();
if (cc.fx.GameConfig.GM_INFO.reviewLongAndShort < 2)
cc.fx.GameConfig.GM_INFO.reviewLongAndShort += 1;

View File

@ -426,8 +426,8 @@ var GameTool = {
//关卡上限
maxLevel() {
let jg = false;
if (cc.fx.GameConfig.GM_INFO.level > 899) {
cc.fx.GameConfig.GM_INFO.level = 900;
if (cc.fx.GameConfig.GM_INFO.level > 829) {
cc.fx.GameConfig.GM_INFO.level = 830;
jg = true;
}
return jg;

View File

@ -35,8 +35,8 @@ export default class Adhesive extends cc.Component {
this.target = node;
this.lockTime = lockTime;
if (this.lockTime > 0) {
NumberToImage.numberToImageNodes(this.lockTime, 20, 8, "time_", this.node.getChildByName("heng").getChildByName("num"), false);
NumberToImage.numberToImageNodes(this.lockTime, 20, 8, "time_", this.node.getChildByName("shu").getChildByName("num"), false);
NumberToImage.numberToImageNodes(this.lockTime, 28, 8, "time_", this.node.getChildByName("heng").getChildByName("num"), false);
NumberToImage.numberToImageNodes(this.lockTime, 28, 8, "time_", this.node.getChildByName("shu").getChildByName("num"), false);
}
}

View File

@ -121,7 +121,7 @@
"y": 0,
"z": 0
},
"stacking": 2,
"boomTime": 2,
"id": 280
},
{
@ -133,7 +133,7 @@
"y": -360,
"z": 0
},
"stacking": 6,
"boomTime": 6,
"id": 290
},
{

View File

@ -187,15 +187,15 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-11.256,
-16.256,
7.74,
0,
0,
0,
0,
1,
0.5,
0.5,
0.85,
0.85,
1
]
},
@ -413,15 +413,15 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-4.432,
-9.195,
4.131,
0,
0,
0,
0,
1,
0.52632,
0.5,
0.85,
0.85,
0.52632
]
},