|
|
@@ -14692,7 +14692,10 @@ mk.ui.openPanel("game/prefab/uiPanel/HarvestPanel");
|
|
|
e.prototype.setAdData = function(e) {
|
|
|
mk.console.logSingle("HarvestData addata ", this.adData);
|
|
|
t.prototype.setAdData.call(this, e);
|
|
|
-this.init_reward = !0;
|
|
|
+gData.reward.adData = gData.harvestData.adData;
|
|
|
+gData.reward.callback = gData.harvestData.call;
|
|
|
+mk.ui.openPanel("module/reward/reward");
|
|
|
+gData.harvestData.call = null;
|
|
|
};
|
|
|
return i([ c ], e);
|
|
|
}(r.Data);
|
|
|
@@ -14876,14 +14879,8 @@ return [ 2 ];
|
|
|
e.prototype.clickSuperBtn = function() {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
var t = this;
|
|
|
-return c(this, function(e) {
|
|
|
-switch (e.label) {
|
|
|
-case 0:
|
|
|
+return c(this, function() {
|
|
|
mk.ui.closePanel("HarvestPanel");
|
|
|
-return [ 4, mk.time.WaitForSeconds(.3) ];
|
|
|
-
|
|
|
-case 1:
|
|
|
-e.sent();
|
|
|
mk.ad.videoAdType = l.VideoAdType.video_init_12;
|
|
|
mk.ad.watchAd(function(e) {
|
|
|
return r(t, void 0, void 0, function() {
|
|
|
@@ -14904,18 +14901,9 @@ return [ 2 ];
|
|
|
});
|
|
|
});
|
|
|
return [ 2 ];
|
|
|
-}
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
-e.prototype.update = function() {
|
|
|
-if (gData.harvestData.init_reward) {
|
|
|
-gData.harvestData.init_reward = !1;
|
|
|
-gData.reward.adData = gData.harvestData.adData;
|
|
|
-gData.reward.callback = gData.harvestData.call;
|
|
|
-mk.ui.openPanel("module/reward/reward");
|
|
|
-}
|
|
|
-};
|
|
|
e.prototype.onEnable = function() {
|
|
|
mk.ad.showBanner(l.BannerAdType.banner_click_6);
|
|
|
};
|
|
|
@@ -19362,12 +19350,6 @@ return [ 2 ];
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
-e.prototype.update = function() {
|
|
|
-if (gData.reward.adData) {
|
|
|
-this.showWatchAdReward();
|
|
|
-gData.turnable.adData = null;
|
|
|
-}
|
|
|
-};
|
|
|
e.prototype.onEnable = function() {
|
|
|
gData.adData.checkPopInter(u.InterAdType.interstitial1_click_1);
|
|
|
mk.ad.showBanner(u.BannerAdType.banner_click_3);
|
|
|
@@ -19391,26 +19373,49 @@ t >= o.redMoney ? this.node_cash.play() : this.node_cash.stop();
|
|
|
};
|
|
|
e.prototype.showWatchAdReward = function() {
|
|
|
if (gData.reward.adData) {
|
|
|
-var t = "0.30";
|
|
|
-t.replace(".", "");
|
|
|
-for (var e = t.split(""), o = 0; o != this.lbl_value.length; ++o) o < e.length ? this.lbl_value[o].string = e[o] : this.lbl_value[o].string = "0";
|
|
|
+this.unschedule(this.onChangeSchedule);
|
|
|
+for (var t = "0.30", e = (t = t.replace(".", "")).split(""), o = 0; o != this.lbl_value.length; ++o) o < e.length ? this.lbl_value[o].string = e[o] : this.lbl_value[o].string = "0";
|
|
|
}
|
|
|
};
|
|
|
e.prototype.showChangePart = function() {
|
|
|
-var t = this, e = this.lbl_value.length;
|
|
|
-this.schedule(function() {
|
|
|
-for (var o = 0; o < e; o++) {
|
|
|
-var n = s.default.rnd(0, 9);
|
|
|
-t.lbl_value[o].string = "" + n;
|
|
|
+this.schedule(this.onChangeSchedule, .1);
|
|
|
+};
|
|
|
+e.prototype.onChangeSchedule = function() {
|
|
|
+for (var t = this.lbl_value.length, e = 0; e < t; e++) {
|
|
|
+var o = s.default.rnd(0, 9);
|
|
|
+this.lbl_value[e].string = "" + o;
|
|
|
}
|
|
|
-}, .1);
|
|
|
};
|
|
|
e.prototype.clickOpenBtn = function() {
|
|
|
+return r(this, void 0, void 0, function() {
|
|
|
+var t = this;
|
|
|
+return c(this, function() {
|
|
|
mk.audio.playEffect("button");
|
|
|
mk.ui.closePanel(this.name);
|
|
|
-this.sp_icon.node.active ? this.creatorDownLoadTask() : mk.ad.watchAd(function(t) {
|
|
|
-mk.console.log("watchAD:" + t);
|
|
|
-t && gData.adData.watchVideo(p.AdFun.bubble);
|
|
|
+if (this.sp_icon.node.active) this.creatorDownLoadTask(); else {
|
|
|
+mk.ad.videoAdType = u.VideoAdType.video_init_12;
|
|
|
+mk.ad.watchAd(function(e) {
|
|
|
+return r(t, void 0, void 0, function() {
|
|
|
+return c(this, function(t) {
|
|
|
+switch (t.label) {
|
|
|
+case 0:
|
|
|
+mk.console.log("watchAD:" + e);
|
|
|
+return e ? [ 4, gData.adData.watchVideo(p.AdFun.harvest) ] : [ 3, 2 ];
|
|
|
+
|
|
|
+case 1:
|
|
|
+t.sent();
|
|
|
+mk.ui.closePanel(this.node.name);
|
|
|
+t.label = 2;
|
|
|
+
|
|
|
+case 2:
|
|
|
+return [ 2 ];
|
|
|
+}
|
|
|
+});
|
|
|
+});
|
|
|
+});
|
|
|
+}
|
|
|
+return [ 2 ];
|
|
|
+});
|
|
|
});
|
|
|
};
|
|
|
e.prototype.clickCloseBtn = function() {
|
|
|
@@ -21381,13 +21386,6 @@ return e;
|
|
|
e.prototype.start = function() {
|
|
|
this.showChangePart();
|
|
|
};
|
|
|
-e.prototype.update = function() {
|
|
|
-if (gData.harvestData.init_reward) {
|
|
|
-gData.harvestData.init_reward = !1;
|
|
|
-gData.reward.adData = gData.harvestData.adData;
|
|
|
-mk.ui.openPanel("module/reward/reward");
|
|
|
-}
|
|
|
-};
|
|
|
e.prototype.showChangePart = function() {
|
|
|
var t = this, e = this.lbl_value.length;
|
|
|
this.schedule(function() {
|
|
|
@@ -21400,15 +21398,8 @@ t.lbl_value[o].string = "" + n;
|
|
|
e.prototype.clickVideoBtn = function() {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
var t = this;
|
|
|
-return c(this, function(e) {
|
|
|
-switch (e.label) {
|
|
|
-case 0:
|
|
|
+return c(this, function() {
|
|
|
mk.audio.playEffect("button");
|
|
|
-mk.ui.closePanel(this.node.name);
|
|
|
-return [ 4, mk.time.WaitForSeconds(.3) ];
|
|
|
-
|
|
|
-case 1:
|
|
|
-e.sent();
|
|
|
mk.ad.videoAdType = u.VideoAdType.video_init_12;
|
|
|
mk.ad.watchAd(function(e) {
|
|
|
return r(t, void 0, void 0, function() {
|
|
|
@@ -21420,6 +21411,7 @@ return e ? [ 4, gData.adData.watchVideo(p.AdFun.harvest) ] : [ 3, 2 ];
|
|
|
|
|
|
case 1:
|
|
|
t.sent();
|
|
|
+mk.ui.closePanel(this.node.name);
|
|
|
t.label = 2;
|
|
|
|
|
|
case 2:
|
|
|
@@ -21429,7 +21421,6 @@ return [ 2 ];
|
|
|
});
|
|
|
});
|
|
|
return [ 2 ];
|
|
|
-}
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
@@ -21522,7 +21513,7 @@ this.node_complete.active = !1;
|
|
|
this.node_Uncomplete.active = !1;
|
|
|
this.node_complete.active = !0;
|
|
|
}
|
|
|
-this.lbl_progress.string = (t / e).toString();
|
|
|
+this.lbl_progress.string = t + "/" + e;
|
|
|
this.sp_taskProgress.fillRange = t / e;
|
|
|
}
|
|
|
gData.gameData.init_productTask = !1;
|