优化战令充值后领取

This commit is contained in:
COMPUTER\EDY 2026-07-14 21:53:38 +08:00
parent 3046e1240c
commit 276dd1274d
5 changed files with 31 additions and 9 deletions

View File

@ -2348,6 +2348,14 @@ export default class Block extends cc.Component {
let cm: any = cc.director.getCollisionManager(); let cm: any = cc.director.getCollisionManager();
cm.update(); cm.update();
} }
// 可移动地板会带着整组方块一起移动,花瓣盖板下的方块也还未解锁。
// 这两种状态不能借用自身颜色的单色地块穿行,否则组内其他颜色的方块
// 可能停在单色地块上,并在解除地板/盖板后无法移出。
canPassSameColorSimpleBlock() {
return this.block_Info?.floorMove !== true && this.flowerType !== 2;
}
// ============================================ // ============================================
// 恢复成普通方块方法 // 恢复成普通方块方法
// 功能将特殊类型方块恢复为普通块type=0 // 功能将特殊类型方块恢复为普通块type=0

View File

@ -5963,6 +5963,10 @@ export default class MapConroler extends cc.Component {
//判断方块是否是可移动类型,或者可消除类型 //判断方块是否是可移动类型,或者可消除类型
blockCanMove(block) { 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) { if (block.getComponent("Block").block_Info.floor != undefined && block.getComponent("Block").block_Info.floor != null) {
return false; return false;

View File

@ -520,10 +520,14 @@ export class LQCollide extends Component {
} }
} }
if (collide.node.parent.getComponent("Block")) { if (collide.node.parent.getComponent("Block")) {
let collideBlock = collide.node.parent.getComponent("Block");
let blockType22 = block.type == 22; let blockType22 = block.type == 22;
let collideType22 = collide.node.parent.getComponent("Block").type == 22; let collideType22 = collideBlock.type == 22;
if (blockType22 != collideType22) { 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; jg = true;
} }
} }

View File

@ -309,7 +309,7 @@ export class GameConfig {
vibrateOpen: true, //震动 vibrateOpen: true, //震动
coinnum: 0, //每局的金币数 coinnum: 0, //每局的金币数
paid_user: false, //是否是付费用户 paid_user: false, //是否是付费用户
version: "1.9.96", //版本号 version: "1.9.97", //版本号
shushu_DistinctId: "", //数数访客ID shushu_DistinctId: "", //数数访客ID
shushu_AccountId: "", //数数账号ID shushu_AccountId: "", //数数账号ID
uid: "", //用户和后端唯一id uid: "", //用户和后端唯一id

View File

@ -749,21 +749,27 @@ export default class passCheck extends cc.Component {
this.activateBtn.node.active = false; this.activateBtn.node.active = false;
} }
cc.fx.GameConfig.GM_INFO.passCheckActivate = true; cc.fx.GameConfig.GM_INFO.passCheckActivate = true;
this.setbarNodePosX();
// 获取passCheckMgr实例并更新激活状态 // 获取passCheckMgr实例并更新激活状态
if (this.passCheckMgr && typeof this.passCheckMgr.refreshPassCheckItems === 'function') { if (this.passCheckMgr && typeof this.passCheckMgr.refreshPassCheckItems === 'function') {
this.passCheckMgr.refreshPassCheckItems(); this.passCheckMgr.refreshPassCheckItems();
} }
this.setbarNodePosX();
} }
setbarNodePosX() { setbarNodePosX() {
let activate = cc.fx.GameConfig.GM_INFO.passCheckActivate; let activate = cc.fx.GameConfig.GM_INFO.passCheckActivate;
let barNode = this.node.getChildByName("centralNode").getChildByName("barNode") 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) { if (activate || cc.fx.GameConfig.GM_INFO.getItemType == 1) {
barNode.x = 0; barNode.x = 0;
} else { } else {
barNode.x = -253; barNode.x = -253;
} }
} else {
console.warn("setbarNodePosX: centralNode 或 barNode 不存在,跳过位置更新");
}
} }
allGetReward() { allGetReward() {