|
|
@@ -3740,7 +3740,7 @@ var o;
|
|
|
return a(this, function(n) {
|
|
|
switch (n.label) {
|
|
|
case 0:
|
|
|
-if (!this._switchMusic) return [ 2 ];
|
|
|
+this._switchMusic ? this.setMusicVolume(1) : this.setMusicVolume(0);
|
|
|
if (this._bg_audio) return [ 3, 2 ];
|
|
|
o = this;
|
|
|
return [ 4, mk.loader.load(r + t, cc.AudioClip) ];
|
|
|
@@ -3784,7 +3784,7 @@ cc.audioEngine.stopEffect(t);
|
|
|
};
|
|
|
t.prototype.switchEffectFunc = function() {
|
|
|
this._switchEffect = !this._switchEffect;
|
|
|
-this._switchEffect || this.setStopAllEffect();
|
|
|
+this._switchEffect ? this.setEffectVolume(1) : this.setEffectVolume(0);
|
|
|
cc.sys.localStorage.setItem("switchEffect", this._switchEffect.toString());
|
|
|
};
|
|
|
t.prototype.getSwitchEffect = function() {
|
|
|
@@ -3809,7 +3809,7 @@ cc.audioEngine.stopAllEffects();
|
|
|
};
|
|
|
t.prototype.switchMusicFunc = function() {
|
|
|
this._switchMusic = !this._switchMusic;
|
|
|
-this._switchMusic ? this.setResumeMusic() : this.setPauseMusic();
|
|
|
+this._switchMusic ? this.setMusicVolume(1) : this.setMusicVolume(0);
|
|
|
cc.sys.localStorage.setItem("switchMusic", this._switchMusic.toString());
|
|
|
};
|
|
|
t.prototype.getSwitchMusic = function() {
|
|
|
@@ -12206,7 +12206,10 @@ i = a.sent();
|
|
|
mk.console.logSingle("refrehTask=>", i);
|
|
|
if (0 != i.errcode) return [ 2, !1 ];
|
|
|
this.playerProp.userFarmTaskInfo = i.data.userFarmTaskInfo;
|
|
|
-this.playerProp.userFarmTaskInfo.completeCount >= this.playerProp.userFarmTaskInfo.taskCount && mk.guide.open(5);
|
|
|
+if (this.playerProp.userFarmTaskInfo.completeCount >= this.playerProp.userFarmTaskInfo.taskCount) {
|
|
|
+mk.ui.closeAllUI();
|
|
|
+mk.guide.open(5);
|
|
|
+}
|
|
|
t && (gData.gameData.init_task = !0);
|
|
|
return [ 2, !0 ];
|
|
|
}
|
|
|
@@ -13848,10 +13851,7 @@ a = n.data.userExp - gData.gameData.playerProp.farmExpValue;
|
|
|
if (e) gData.gameData.gameStyle.doFlyExpAni(a, e, n.data); else {
|
|
|
this.changeExp = !0;
|
|
|
mk.tip.pop("获得" + a + "点等级经验");
|
|
|
-if (gData.gameData.playerProp.gradeLevel < n.data.farmLevel) {
|
|
|
-gData.gameData.playerProp.gradeLevel = n.data.farmLevel;
|
|
|
-gData.gameData.checkGradeUpUnLock();
|
|
|
-}
|
|
|
+gData.gameData.playerProp.gradeLevel < n.data.farmLevel && (gData.gameData.playerProp.gradeLevel = n.data.farmLevel);
|
|
|
gData.gameData.playerProp.farmExpValue = n.data.userExp;
|
|
|
gData.gameData.playerProp.farmGradeData = n.data.userFarmGrageRewardInfo;
|
|
|
gData.gameData.init_red_point = !0;
|
|
|
@@ -23596,6 +23596,7 @@ this.node_task.active = !1;
|
|
|
this.openBtn_ani.node.active = !1;
|
|
|
this.lbl_Ani.node.active = !0;
|
|
|
gData.gameData.init_task = !0;
|
|
|
+this.node_hand.active = !1;
|
|
|
};
|
|
|
e.prototype.onEnable = function() {
|
|
|
mk.ad.showBanner(u.BannerAdType.banner_click_2);
|
|
|
@@ -23682,7 +23683,7 @@ t.lbl_taskProgress.string = e + "/" + o;
|
|
|
}).start();
|
|
|
this.lbl_taskNum.string = o.toString();
|
|
|
var a = this.openBtn_ani.getComponent(p.default);
|
|
|
-a && e < o && a.setGray(!0);
|
|
|
+a && e < o && a.setGray(!0, !0);
|
|
|
this.isCanCash = e >= o;
|
|
|
this.node_hand.active = this.isCanCash;
|
|
|
this.isCanCash && gData.adData.checkShowVideoIcon() ? this.node_videoIcon.active = !0 : this.node_videoIcon.active = !1;
|
|
|
@@ -23744,6 +23745,7 @@ return [ 2, null ];
|
|
|
gData.gameData.playerProp.userFarmTaskInfo = e.data.userFarmTaskInfo;
|
|
|
gData.gameData.playerProp.completeFarmTaskTimes = e.data.completeFarmTaskTimes;
|
|
|
mk.data.setTAEventUser(0, "Cumulative_task", gData.gameData.playerProp.completeFarmTaskTimes);
|
|
|
+gData.gameData.checkGradeUpUnLock();
|
|
|
gData.gameData.init_task = !0;
|
|
|
this.maxNum = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
|
|
|
this.num = 0;
|
|
|
@@ -25282,34 +25284,35 @@ this.labRichArr = this.node.getComponentsInChildren(cc.RichText);
|
|
|
this.skeArr = this.node.getComponentsInChildren(sp.Skeleton);
|
|
|
this.setGray(this.grayState);
|
|
|
};
|
|
|
-e.prototype.setGray = function(t) {
|
|
|
+e.prototype.setGray = function(t, e) {
|
|
|
+void 0 === e && (e = !1);
|
|
|
if (this.lastState != t) {
|
|
|
this.lastState = t;
|
|
|
if (t) {
|
|
|
-for (var e = this.spArr.length, o = 0; o < e; o++) this.spArr[o].setMaterial(0, this.gray);
|
|
|
-for (var n = this.btnArr.length, a = 0; a < n; a++) {
|
|
|
-this.btnArr[a].enableAutoGrayEffect = !0;
|
|
|
-this.btnArr[a].grayMaterial = this.gray;
|
|
|
-this.btnArr[a].interactable = !1;
|
|
|
+for (var o = this.spArr.length, n = 0; n < o; n++) this.spArr[n].setMaterial(0, this.gray);
|
|
|
+if (!e) for (var a = this.btnArr.length, i = 0; i < a; i++) {
|
|
|
+this.btnArr[i].enableAutoGrayEffect = !0;
|
|
|
+this.btnArr[i].grayMaterial = this.gray;
|
|
|
+this.btnArr[i].interactable = !1;
|
|
|
}
|
|
|
-for (var i = this.labArr.length, r = 0; r < i; r++) {
|
|
|
-this.labArrC[r] = this.labArr[r].node.color;
|
|
|
-this.labArr[r].node.color = this.grayColor;
|
|
|
+for (var r = this.labArr.length, c = 0; c < r; c++) {
|
|
|
+this.labArrC[c] = this.labArr[c].node.color;
|
|
|
+this.labArr[c].node.color = this.grayColor;
|
|
|
}
|
|
|
-for (var c = this.outLineArr.length, s = 0; s < c; s++) {
|
|
|
-this.outLineArrC[s] = this.outLineArr[s].color;
|
|
|
-this.outLineArr[s].color = this.grayOutLineColor;
|
|
|
+for (var s = this.outLineArr.length, l = 0; l < s; l++) {
|
|
|
+this.outLineArrC[l] = this.outLineArr[l].color;
|
|
|
+this.outLineArr[l].color = this.grayOutLineColor;
|
|
|
}
|
|
|
-for (var l = this.labRichArr.length, p = 0; p < l; p++) {
|
|
|
-this.labRichArrC[p] = this.labRichArr[p].node.color;
|
|
|
-this.labRichArr[p].node.color = this.grayColor;
|
|
|
+for (var p = this.labRichArr.length, u = 0; u < p; u++) {
|
|
|
+this.labRichArrC[u] = this.labRichArr[u].node.color;
|
|
|
+this.labRichArr[u].node.color = this.grayColor;
|
|
|
}
|
|
|
} else {
|
|
|
-for (e = this.spArr.length, o = 0; o < e; o++) this.spArr[o].setMaterial(0, this.normal);
|
|
|
-for (n = this.btnArr.length, a = 0; a < n; a++) this.btnArr[a].interactable = !0;
|
|
|
-for (i = this.labArr.length, r = 0; r < i; r++) this.labArr[r].node.color = this.labArrC[r];
|
|
|
-for (c = this.outLineArr.length, s = 0; s < c; s++) this.outLineArr[s].color = this.outLineArrC[s];
|
|
|
-for (l = this.labRichArr.length, p = 0; p < l; p++) this.labRichArr[p].node.color = this.labRichArrC[p];
|
|
|
+for (o = this.spArr.length, n = 0; n < o; n++) this.spArr[n].setMaterial(0, this.normal);
|
|
|
+if (!e) for (a = this.btnArr.length, i = 0; i < a; i++) this.btnArr[i].interactable = !0;
|
|
|
+for (r = this.labArr.length, c = 0; c < r; c++) this.labArr[c].node.color = this.labArrC[c];
|
|
|
+for (s = this.outLineArr.length, l = 0; l < s; l++) this.outLineArr[l].color = this.outLineArrC[l];
|
|
|
+for (p = this.labRichArr.length, u = 0; u < p; u++) this.labRichArr[u].node.color = this.labRichArrC[u];
|
|
|
}
|
|
|
} else console.log("和上次设置相同");
|
|
|
};
|
|
|
@@ -25571,8 +25574,8 @@ var t, e;
|
|
|
return c(this, function(o) {
|
|
|
switch (o.label) {
|
|
|
case 0:
|
|
|
-mk.audio.switchMusicFunc();
|
|
|
mk.audio.playEffect("button");
|
|
|
+mk.audio.switchMusicFunc();
|
|
|
t = "module/setting/texture/" + (mk.audio.getSwitchMusic() ? "on" : "off");
|
|
|
e = this.img_music;
|
|
|
return [ 4, mk.loader.load(t, cc.SpriteFrame) ];
|