更新
This commit is contained in:
parent
ab525e8d05
commit
ee0f9db31e
|
|
@ -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,18 +2773,20 @@ 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;
|
||||
MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock").nowColor = this.color;
|
||||
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;
|
||||
MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock").nowColor = this.color;
|
||||
if (this.color && MapConroler._instance.mapBlocksWall[x][y])
|
||||
MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock").nowColor = this.color;
|
||||
}
|
||||
}
|
||||
MapConroler._instance.checkButton();
|
||||
|
|
@ -2846,7 +2847,8 @@ 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 = "";
|
||||
MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock").nowColor = -1;
|
||||
if (MapConroler._instance.buttonBlock.length > 0)
|
||||
MapConroler._instance.mapBlocksWall[x][y].getComponent("MapBlock").nowColor = -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,18 +514,30 @@ 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);
|
||||
let propInfo = {
|
||||
"freezeAmount": data.freezeAmount,
|
||||
"hammerAmount": data.hammerAmount,
|
||||
"magicAmount": data.magicAmount,
|
||||
"timestamp": timestamp,
|
||||
if (data.forcedUpdate == true) {
|
||||
let propInfo = {
|
||||
"freezeAmount": data.freezeAmount,
|
||||
"hammerAmount": data.hammerAmount,
|
||||
"magicAmount": data.magicAmount,
|
||||
"timestamp": timestamp,
|
||||
}
|
||||
cc.fx.GameConfig.GM_INFO.freezeAmount = data.freezeAmount;
|
||||
cc.fx.GameConfig.GM_INFO.hammerAmount = data.hammerAmount;
|
||||
cc.fx.GameConfig.GM_INFO.magicAmount = data.magicAmount;
|
||||
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)
|
||||
}
|
||||
cc.fx.GameConfig.GM_INFO.freezeAmount = data.freezeAmount;
|
||||
cc.fx.GameConfig.GM_INFO.hammerAmount = data.hammerAmount;
|
||||
cc.fx.GameConfig.GM_INFO.magicAmount = data.magicAmount;
|
||||
cc.fx.GameConfig.GM_INFO.level = data.levelAmount;
|
||||
cc.fx.GameConfig.GM_INFO.coin = data.coinAmount;
|
||||
cc.fx.StorageMessage.setStorage("prop", propInfo);
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -2326,8 +2326,10 @@ 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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ export default class NewClass extends cc.Component {
|
|||
nowColor: number = -1;
|
||||
|
||||
onLoad() {
|
||||
this.nowColor = -1;
|
||||
// this.direction = "";
|
||||
// this.block_Id = "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user