From 276dd1274de208e681c28c0a0d8d950d25f892d9 Mon Sep 17 00:00:00 2001 From: "COMPUTER\\EDY" <249929363@qq.com> Date: Tue, 14 Jul 2026 21:53:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=88=98=E4=BB=A4=E5=85=85?= =?UTF-8?q?=E5=80=BC=E5=90=8E=E9=A2=86=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Script/Block.ts | 8 ++++++++ assets/Script/Map.ts | 4 ++++ assets/Script/lq_collide_system/lq_collide.ts | 10 +++++++--- assets/Script/module/Config/GameConfig.ts | 2 +- assets/shop/script/passCheck.ts | 16 +++++++++++----- 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/assets/Script/Block.ts b/assets/Script/Block.ts index 0570374..6282ece 100644 --- a/assets/Script/Block.ts +++ b/assets/Script/Block.ts @@ -2348,6 +2348,14 @@ export default class Block extends cc.Component { let cm: any = cc.director.getCollisionManager(); cm.update(); } + + // 可移动地板会带着整组方块一起移动,花瓣盖板下的方块也还未解锁。 + // 这两种状态不能借用自身颜色的单色地块穿行,否则组内其他颜色的方块 + // 可能停在单色地块上,并在解除地板/盖板后无法移出。 + canPassSameColorSimpleBlock() { + return this.block_Info?.floorMove !== true && this.flowerType !== 2; + } + // ============================================ // 恢复成普通方块方法 // 功能:将特殊类型方块恢复为普通块(type=0) diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index d68c8b3..6eb3259 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -5963,6 +5963,10 @@ export default class MapConroler extends cc.Component { //判断方块是否是可移动类型,或者可消除类型 blockCanMove(block) { + // 花瓣盖板尚未解除时,方块不能独立移动或参与可通行预判。 + if (block.getComponent("Block").flowerType == 2) { + return false; + } //地板块不能消除 if (block.getComponent("Block").block_Info.floor != undefined && block.getComponent("Block").block_Info.floor != null) { return false; diff --git a/assets/Script/lq_collide_system/lq_collide.ts b/assets/Script/lq_collide_system/lq_collide.ts index b2f1af2..f0d9df8 100644 --- a/assets/Script/lq_collide_system/lq_collide.ts +++ b/assets/Script/lq_collide_system/lq_collide.ts @@ -520,10 +520,14 @@ export class LQCollide extends Component { } } if (collide.node.parent.getComponent("Block")) { + let collideBlock = collide.node.parent.getComponent("Block"); let blockType22 = block.type == 22; - let collideType22 = collide.node.parent.getComponent("Block").type == 22; + let collideType22 = collideBlock.type == 22; if (blockType22 != collideType22) { - if (block.color == collide.node.parent.getComponent("Block").color && collide.node.parent.getComponent("Block").block_Info.floor == undefined) { + // 同色单色地块只对可独立移动的普通方块放行。判断实际的 + // 非单色方块,避免碰撞双方顺序不同时出现一边能过、一边不能过。 + let colorBlock = blockType22 ? collideBlock : block; + if (block.color == collideBlock.color && colorBlock.canPassSameColorSimpleBlock()) { jg = true; } } @@ -535,4 +539,4 @@ export class LQCollide extends Component { return jg; } -} \ No newline at end of file +} diff --git a/assets/Script/module/Config/GameConfig.ts b/assets/Script/module/Config/GameConfig.ts index 4ed9480..54fa0ea 100644 --- a/assets/Script/module/Config/GameConfig.ts +++ b/assets/Script/module/Config/GameConfig.ts @@ -309,7 +309,7 @@ export class GameConfig { vibrateOpen: true, //震动 coinnum: 0, //每局的金币数 paid_user: false, //是否是付费用户 - version: "1.9.96", //版本号 + version: "1.9.97", //版本号 shushu_DistinctId: "", //数数访客ID shushu_AccountId: "", //数数账号ID uid: "", //用户和后端唯一id diff --git a/assets/shop/script/passCheck.ts b/assets/shop/script/passCheck.ts index 1239cea..0b0e539 100644 --- a/assets/shop/script/passCheck.ts +++ b/assets/shop/script/passCheck.ts @@ -749,20 +749,26 @@ export default class passCheck extends cc.Component { this.activateBtn.node.active = false; } cc.fx.GameConfig.GM_INFO.passCheckActivate = true; - this.setbarNodePosX(); // 获取passCheckMgr实例并更新激活状态 if (this.passCheckMgr && typeof this.passCheckMgr.refreshPassCheckItems === 'function') { this.passCheckMgr.refreshPassCheckItems(); } + this.setbarNodePosX(); + } setbarNodePosX() { let activate = cc.fx.GameConfig.GM_INFO.passCheckActivate; - let barNode = this.node.getChildByName("centralNode").getChildByName("barNode") - if (activate || cc.fx.GameConfig.GM_INFO.getItemType == 1) { - barNode.x = 0; + let centralNode = this.node && this.node.getChildByName("centralNode"); + let barNode = centralNode && centralNode.getChildByName("barNode"); + if (barNode) { + if (activate || cc.fx.GameConfig.GM_INFO.getItemType == 1) { + barNode.x = 0; + } else { + barNode.x = -253; + } } else { - barNode.x = -253; + console.warn("setbarNodePosX: centralNode 或 barNode 不存在,跳过位置更新"); } }