|
|
@@ -12191,26 +12191,28 @@ this.updateNewTaskProgress();
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
-t.prototype.updateNewTaskProgress = function() {
|
|
|
+t.prototype.updateNewTaskProgress = function(t) {
|
|
|
+void 0 === t && (t = !1);
|
|
|
return n(this, void 0, void 0, function() {
|
|
|
-var t, e, o, n;
|
|
|
+var e, o, n, i;
|
|
|
return a(this, function(a) {
|
|
|
switch (a.label) {
|
|
|
case 0:
|
|
|
if (this.playerProp.userFarmTaskInfo) {
|
|
|
-t = this.playerProp.userFarmTaskInfo.completeCount;
|
|
|
-e = this.playerProp.userFarmTaskInfo.taskCount;
|
|
|
-if (t >= e) return [ 2 ];
|
|
|
+e = this.playerProp.userFarmTaskInfo.completeCount;
|
|
|
+o = this.playerProp.userFarmTaskInfo.taskCount;
|
|
|
+if (e >= o) return [ 2 ];
|
|
|
}
|
|
|
-o = {};
|
|
|
-return [ 4, mk.http.sendData("farmTask/updateUserFarmTaskInfo", o) ];
|
|
|
+n = {};
|
|
|
+return [ 4, mk.http.sendData("farmTask/updateUserFarmTaskInfo", n) ];
|
|
|
|
|
|
case 1:
|
|
|
-n = a.sent();
|
|
|
-mk.console.logSingle("refrehTask=>", n);
|
|
|
-if (0 != n.errcode) return [ 2, null ];
|
|
|
-this.playerProp.userFarmTaskInfo = n.data.userFarmTaskInfo;
|
|
|
+i = a.sent();
|
|
|
+mk.console.logSingle("refrehTask=>", i);
|
|
|
+if (0 != i.errcode) return [ 2, null ];
|
|
|
+this.playerProp.userFarmTaskInfo = i.data.userFarmTaskInfo;
|
|
|
this.playerProp.userFarmTaskInfo.completeCount >= this.playerProp.userFarmTaskInfo.taskCount && mk.guide.open(5);
|
|
|
+t && (gData.gameData.init_task = !0);
|
|
|
return [ 2 ];
|
|
|
}
|
|
|
});
|
|
|
@@ -13211,7 +13213,7 @@ if (gData.gameData.init_redBagTask) {
|
|
|
this.lbl_task.string = "<b><color=#8D4D32>点击领取任务!</c></b>";
|
|
|
this.node_hand.active = !0;
|
|
|
} else {
|
|
|
-this.lbl_task.string = "<b><color=#8D4D32>进行" + e + "次生产</c><color=#7EB80E>(" + t + "/" + e + ")</color></b>";
|
|
|
+this.lbl_task.string = "<b><color=#8D4D32>进行" + e + "次生产</c><color=#D73D25>(" + t + "/" + e + ")</color></b>";
|
|
|
this.node_hand.active = t >= e;
|
|
|
}
|
|
|
}
|
|
|
@@ -19775,7 +19777,7 @@ this.showElectUI();
|
|
|
}
|
|
|
this.showChangePart();
|
|
|
this.initCashOutStyle(gData.gameData.playerProp.redMoney);
|
|
|
-mk.ui.registerRefreshEvent(this.node, this.initCashOutStyle.bind(this), "refreshCoin");
|
|
|
+mk.ui.registerRefreshEvent(this, this.initCashOutStyle.bind(this), "refreshCoin");
|
|
|
};
|
|
|
e.prototype.showElectUI = function() {
|
|
|
this.sendRecommendList();
|
|
|
@@ -19805,7 +19807,7 @@ gData.adData.checkPopInter(u.InterAdType.interstitial1_click_1);
|
|
|
mk.ad.showBanner(u.BannerAdType.banner_click_3);
|
|
|
};
|
|
|
e.prototype.onDisable = function() {
|
|
|
-mk.ui.removeRefreshEvent(this.node);
|
|
|
+mk.ui.removeRefreshEvent(this);
|
|
|
mk.ad.destoryBanner();
|
|
|
};
|
|
|
e.prototype.initCashOutStyle = function(t) {
|
|
|
@@ -21227,13 +21229,14 @@ return [ 2 ];
|
|
|
});
|
|
|
};
|
|
|
e.prototype.clickMake = function() {
|
|
|
+mk.audio.playEffect("button");
|
|
|
if (gData.gameData.leftTimes <= 0) mk.ui.openPanel("module/speedUpUI/productReward"); else if (gData.gameData.isProducting) mk.tip.pop("点击太快了"); else {
|
|
|
if (this.data.tab == l.ProductType.nzw) {
|
|
|
gData.farmSystem.plant(this.data.picture);
|
|
|
gData.gameData.nextMake = null;
|
|
|
gData.gameData.setNextProduct(!1);
|
|
|
} else gData.factorySystem.make(this.data.picture);
|
|
|
-gData.gameData.updateNewTaskProgress();
|
|
|
+gData.gameData.updateNewTaskProgress(!0);
|
|
|
}
|
|
|
};
|
|
|
e.prototype.getDesByType = function() {
|
|
|
@@ -23459,7 +23462,7 @@ this.initTaskProgressUI();
|
|
|
this.showChangePart();
|
|
|
}
|
|
|
this.initCashOutStyle(gData.gameData.playerProp.redMoney);
|
|
|
-mk.ui.registerRefreshEvent(this.node, this.initCashOutStyle.bind(this), "refreshCoin");
|
|
|
+mk.ui.registerRefreshEvent(this, this.initCashOutStyle.bind(this), "refreshCoin");
|
|
|
}
|
|
|
};
|
|
|
e.prototype.showNewTaskUI = function() {
|
|
|
@@ -23473,7 +23476,7 @@ e.prototype.onEnable = function() {
|
|
|
mk.ad.showBanner(p.BannerAdType.banner_click_2);
|
|
|
};
|
|
|
e.prototype.onDisable = function() {
|
|
|
-mk.ui.removeRefreshEvent(this.node);
|
|
|
+mk.ui.removeRefreshEvent(this);
|
|
|
mk.ad.destoryBanner();
|
|
|
mk.guide.open(3);
|
|
|
};
|
|
|
@@ -24660,14 +24663,14 @@ this.watchVideoCall();
|
|
|
e.prototype.start = function() {
|
|
|
mk.audio.playEffect("congratulations");
|
|
|
this.initCashOutStyle(gData.gameData.playerProp.redMoney);
|
|
|
-mk.ui.registerRefreshEvent(this.node, this.initCashOutStyle.bind(this), "refreshCoin");
|
|
|
+mk.ui.registerRefreshEvent(this, this.initCashOutStyle.bind(this), "refreshCoin");
|
|
|
};
|
|
|
e.prototype.onEnable = function() {
|
|
|
gData.adData.checkPopInter(l.InterAdType.interstitial1_click_2);
|
|
|
mk.ad.showBanner(l.BannerAdType.banner_click_1);
|
|
|
};
|
|
|
e.prototype.onDisable = function() {
|
|
|
-mk.ui.removeRefreshEvent(this.node);
|
|
|
+mk.ui.removeRefreshEvent(this);
|
|
|
mk.ad.destoryBanner();
|
|
|
};
|
|
|
e.prototype.update = function() {
|
|
|
@@ -24726,7 +24729,6 @@ return [ 2 ];
|
|
|
};
|
|
|
e.prototype.clickGetReward = function() {
|
|
|
cc.log("获取奖励:", gData.reward.data);
|
|
|
-mk.audio.playEffect("redmoney");
|
|
|
var t = this.node_hb.node.parent.convertToWorldSpaceAR(this.node_hb.node.getPosition());
|
|
|
gData.reward.flyCoinAnim(t);
|
|
|
if (gData.reward.callback) {
|
|
|
@@ -26462,13 +26464,13 @@ return e;
|
|
|
e.prototype.start = function() {
|
|
|
this.initCashOutStyle(gData.gameData.playerProp.redMoney);
|
|
|
this.lbl_remainTimes.string = "今日剩余次数:" + gData.gameData.playerProp.speedUpLeftTimes;
|
|
|
-mk.ui.registerRefreshEvent(this.node, this.initCashOutStyle.bind(this), "refreshCoin");
|
|
|
+mk.ui.registerRefreshEvent(this, this.initCashOutStyle.bind(this), "refreshCoin");
|
|
|
};
|
|
|
e.prototype.onEnable = function() {
|
|
|
mk.ad.showBanner(s.BannerAdType.banner_click_5);
|
|
|
};
|
|
|
e.prototype.onDisable = function() {
|
|
|
-mk.ui.removeRefreshEvent(this.node);
|
|
|
+mk.ui.removeRefreshEvent(this);
|
|
|
mk.ad.destoryBanner();
|
|
|
};
|
|
|
e.prototype.update = function() {
|
|
|
@@ -28702,7 +28704,7 @@ e.prototype.onLoad = function() {};
|
|
|
e.prototype.start = function() {
|
|
|
mk.ad.showBanner(r.BannerAdType.banner_click_9);
|
|
|
this.initCashOutStyle(gData.gameData.playerProp.redMoney);
|
|
|
-mk.ui.registerRefreshEvent(this.node, this.initCashOutStyle.bind(this), "refreshCoin");
|
|
|
+mk.ui.registerRefreshEvent(this, this.initCashOutStyle.bind(this), "refreshCoin");
|
|
|
};
|
|
|
e.prototype.update = function() {
|
|
|
gData.reward.add_redbag_value && this.initCashOutStyle(gData.gameData.playerProp.redMoney + gData.reward.add_redbag_value);
|
|
|
@@ -28729,7 +28731,7 @@ gData.reward.addReward();
|
|
|
mk.ui.closePanel(this.node.name);
|
|
|
};
|
|
|
e.prototype.onDisable = function() {
|
|
|
-mk.ui.removeRefreshEvent(this.node);
|
|
|
+mk.ui.removeRefreshEvent(this);
|
|
|
};
|
|
|
e.prototype.onClickClose = function() {
|
|
|
mk.audio.playEffect("closeButton");
|
|
|
@@ -29611,7 +29613,7 @@ this.registerCallBack.set(t, a);
|
|
|
e.prototype.invokeRefreshEventByName = function(t) {
|
|
|
this.registerCallBack.forEach(function(e) {
|
|
|
e.forEach(function(e, o) {
|
|
|
-o == t && e && e();
|
|
|
+o === t && e && e();
|
|
|
});
|
|
|
});
|
|
|
};
|