This commit is contained in:
COMPUTER\EDY 2026-04-29 14:38:41 +08:00
parent ab525e8d05
commit ee0f9db31e
6 changed files with 41 additions and 19 deletions

View File

@ -845,7 +845,6 @@ export default class Block extends cc.Component {
else {
console.log("只是重新刷一遍颜色");
this.initColor(true);
this.setMapColor();
}
}
@ -1415,7 +1414,7 @@ export default class Block extends cc.Component {
MapConroler._instance.blockLock == true
|| MapConroler._instance.change_colorBlock == true || MapConroler._instance.jump_state != null || MapConroler._instance.buttonWall.length > 0)
&& !MapConroler._instance.gameOver && !MapConroler._instance.gameWin) {
console.log("!!!!!!!!!准备判死啦");
let gameover = MapConroler._instance.predict_End(true);
if (gameover == false) {
MapConroler._instance.failReason();
@ -2774,17 +2773,19 @@ export default class Block extends cc.Component {
let x = this.posX + pos.x;
let y = this.posY + pos.y;
MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock").block_Id = this.node.uuid;
if (MapConroler._instance.buttonBlock.length > 0)
MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock").nowColor = this.color;
}
}
}
setMapColor() {
if (this.allBlocks.length > 0) {
if (this.allBlocks.length > 0 && MapConroler._instance.buttonBlock.length > 0) {
for (let i = 0; i < this.allBlocks.length; i++) {
let pos = this.allBlocks[i];
let x = this.posX + pos.x;
let y = this.posY + pos.y;
if (this.color && MapConroler._instance.mapBlocksWall[x][y])
MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock").nowColor = this.color;
}
}
@ -2846,6 +2847,7 @@ export default class Block extends cc.Component {
if (MapConroler._instance.mapBlocksWall[x][y]) {
if (MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock")) {
MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock").block_Id = "";
if (MapConroler._instance.buttonBlock.length > 0)
MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock").nowColor = -1;
}

View File

@ -450,6 +450,7 @@ export default class GameManager extends cc.Component {
data.coinAmount = 0;
}
if (levelInfo.level > data.levelAmount) {
console.log("本地等级 大于服务器等级才走这里")
cc.fx.GameConfig.GM_INFO.level = levelInfo.level;
cc.fx.GameConfig.GM_INFO.coin = coinInfo.coin;
cc.fx.GameConfig.GM_INFO.freezeAmount = propInfo.freezeAmount;
@ -513,6 +514,7 @@ export default class GameManager extends cc.Component {
cc.fx.StorageMessage.setStorage("level", levelInfo);
let coinInfo = { "coin": data.coinAmount, "timestamp": timestamp };
cc.fx.StorageMessage.setStorage("coin", coinInfo);
if (data.forcedUpdate == true) {
let propInfo = {
"freezeAmount": data.freezeAmount,
"hammerAmount": data.hammerAmount,
@ -525,6 +527,17 @@ export default class GameManager extends cc.Component {
cc.fx.GameConfig.GM_INFO.level = data.levelAmount;
cc.fx.GameConfig.GM_INFO.coin = data.coinAmount;
cc.fx.StorageMessage.setStorage("prop", propInfo);
// console.log("走的强制刷新", cc.fx.GameConfig.GM_INFO.hammerAmount)
}
else {
cc.fx.GameConfig.GM_INFO.freezeAmount = propInfo.freezeAmount;
cc.fx.GameConfig.GM_INFO.hammerAmount = propInfo.hammerAmount;
cc.fx.GameConfig.GM_INFO.magicAmount = propInfo.magicAmount;
cc.fx.GameConfig.GM_INFO.level = data.levelAmount;
cc.fx.GameConfig.GM_INFO.coin = data.coinAmount;
// console.log("走的本地缓存刷新", cc.fx.GameConfig.GM_INFO.hammerAmount)
}
this.load3 = true;
this.load4 = true;
}
@ -566,6 +579,7 @@ export default class GameManager extends cc.Component {
"magicAmount": data.magicAmount,
"timestamp": timestamp,
}
console.log("不应该走到这里的的-_----------------");
cc.fx.GameConfig.GM_INFO.freezeAmount = data.freezeAmount;
cc.fx.GameConfig.GM_INFO.hammerAmount = data.hammerAmount;
cc.fx.GameConfig.GM_INFO.magicAmount = data.magicAmount;

View File

@ -2326,9 +2326,11 @@ export default class MapConroler extends cc.Component {
});
if (colorBlock.length > 0) {
for (let i = 0; i < colorBlock.length; i++) {
if (colorBlock[i])
if (colorBlock[i]) {
colorBlock[i].getComponent("Block").changeBlockColor();
}
}
}
}

View File

@ -32,6 +32,7 @@ export default class NewClass extends cc.Component {
nowColor: number = -1;
onLoad() {
this.nowColor = -1;
// this.direction = "";
// this.block_Id = "";
}

View File

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

View File

@ -1437,6 +1437,9 @@ export default class Utils {
console.log("设置无尽关卡等级:", setData);
Utils.POST("setUserLevel", setData, res => {
if (res.code === 1) {
let endLevelNum = res.data.endLevelNum;
if (parseInt(data2) < Number(endLevelNum))
cc.fx.GameConfig.GM_INFO.endLevelNum = Number(endLevelNum);
console.log("设置无尽关卡", res);
if (callBack) callBack(res);
} else {