|
|
@@ -7015,9 +7015,9 @@ case r.bottomIn:
|
|
|
this.effect_par.active = !0;
|
|
|
this.effect_par.x = 0;
|
|
|
this.effect_par.y = this.effect_par.y - cc.winSize.height;
|
|
|
-cc.tween(this.effect_par).by(.3, {
|
|
|
+cc.tween(this.effect_par).by(.15, {
|
|
|
y: cc.winSize.height
|
|
|
-}, cc.easeSineOut()).start();
|
|
|
+}, cc.easeOut(3)).start();
|
|
|
}
|
|
|
};
|
|
|
e.prototype.hideEffect = function(t) {
|
|
|
@@ -11789,9 +11789,11 @@ gData.gameData.setNextProduct(!1);
|
|
|
}
|
|
|
};
|
|
|
t.prototype.makeProduct = function() {
|
|
|
+var t = !0;
|
|
|
switch (this.nextType) {
|
|
|
case 0:
|
|
|
mk.tip.pop("农场已满,无法继续生产");
|
|
|
+t = !1;
|
|
|
break;
|
|
|
|
|
|
case 1:
|
|
|
@@ -11817,6 +11819,7 @@ this.setNextProduct(!1);
|
|
|
gData.adData.checkPopRed();
|
|
|
this.updateNewTaskProgress();
|
|
|
}
|
|
|
+return t;
|
|
|
};
|
|
|
t.prototype.updateNewTaskProgress = function() {
|
|
|
return n(this, void 0, void 0, function() {
|
|
|
@@ -12985,12 +12988,11 @@ e.prototype.onClickInvite = function() {
|
|
|
mk.data.sendDataEvent(l.DataEventId.button_click, "邀请icon");
|
|
|
};
|
|
|
e.prototype.onClickPlant = function() {
|
|
|
-if (gData.gameData.leftTimes <= 0) mk.ui.openPanel("module/speedUpUI/productReward"); else if (gData.gameData.isProducting) mk.tip.pop("点击太快了"); else {
|
|
|
-gData.gameData.makeProduct();
|
|
|
+if (gData.gameData.leftTimes <= 0) mk.ui.openPanel("module/speedUpUI/productReward"); else if (gData.gameData.isProducting) mk.tip.pop("点击太快了"); else if (gData.gameData.makeProduct()) {
|
|
|
var t = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
|
|
|
mk.fly.PlayCoinAnim(1, 3, this.btn_product, t, function() {
|
|
|
gData.gameData.init_task = !0;
|
|
|
-}, 1);
|
|
|
+}, .8);
|
|
|
}
|
|
|
};
|
|
|
e.prototype.doFlyExpAni = function(t, e, o) {
|
|
|
@@ -20766,7 +20768,7 @@ e.prototype.clickMake = function() {
|
|
|
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.farmSystem.selectNextFarm(!1);
|
|
|
+gData.gameData.setNextProduct(!1);
|
|
|
} else gData.factorySystem.make(this.data.picture);
|
|
|
};
|
|
|
e.prototype.getDesByType = function() {
|
|
|
@@ -21253,11 +21255,123 @@ t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o(
|
|
|
var a, i = arguments.length, r = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n;
|
|
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, n); else for (var c = t.length - 1; c >= 0; c--) (a = t[c]) && (r = (i < 3 ? a(r) : i > 3 ? a(e, o, r) : a(e, o)) || r);
|
|
|
return i > 3 && r && Object.defineProperty(e, o, r), r;
|
|
|
+}, r = this && this.__awaiter || function(t, e, o, n) {
|
|
|
+return new (o || (o = Promise))(function(a, i) {
|
|
|
+function r(t) {
|
|
|
+try {
|
|
|
+s(n.next(t));
|
|
|
+} catch (t) {
|
|
|
+i(t);
|
|
|
+}
|
|
|
+}
|
|
|
+function c(t) {
|
|
|
+try {
|
|
|
+s(n.throw(t));
|
|
|
+} catch (t) {
|
|
|
+i(t);
|
|
|
+}
|
|
|
+}
|
|
|
+function s(t) {
|
|
|
+t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) {
|
|
|
+t(e);
|
|
|
+})).then(r, c);
|
|
|
+var e;
|
|
|
+}
|
|
|
+s((n = n.apply(t, e || [])).next());
|
|
|
+});
|
|
|
+}, c = this && this.__generator || function(t, e) {
|
|
|
+var o, n, a, i, r = {
|
|
|
+label: 0,
|
|
|
+sent: function() {
|
|
|
+if (1 & a[0]) throw a[1];
|
|
|
+return a[1];
|
|
|
+},
|
|
|
+trys: [],
|
|
|
+ops: []
|
|
|
+};
|
|
|
+return i = {
|
|
|
+next: c(0),
|
|
|
+throw: c(1),
|
|
|
+return: c(2)
|
|
|
+}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
|
|
|
+return this;
|
|
|
+}), i;
|
|
|
+function c(t) {
|
|
|
+return function(e) {
|
|
|
+return s([ t, e ]);
|
|
|
+};
|
|
|
+}
|
|
|
+function s(i) {
|
|
|
+if (o) throw new TypeError("Generator is already executing.");
|
|
|
+for (;r; ) try {
|
|
|
+if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n),
|
|
|
+0) : n.next) && !(a = a.call(n, i[1])).done) return a;
|
|
|
+(n = 0, a) && (i = [ 2 & i[0], a.value ]);
|
|
|
+switch (i[0]) {
|
|
|
+case 0:
|
|
|
+case 1:
|
|
|
+a = i;
|
|
|
+break;
|
|
|
+
|
|
|
+case 4:
|
|
|
+r.label++;
|
|
|
+return {
|
|
|
+value: i[1],
|
|
|
+done: !1
|
|
|
+};
|
|
|
+
|
|
|
+case 5:
|
|
|
+r.label++;
|
|
|
+n = i[1];
|
|
|
+i = [ 0 ];
|
|
|
+continue;
|
|
|
+
|
|
|
+case 7:
|
|
|
+i = r.ops.pop();
|
|
|
+r.trys.pop();
|
|
|
+continue;
|
|
|
+
|
|
|
+default:
|
|
|
+if (!(a = r.trys, a = a.length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) {
|
|
|
+r = 0;
|
|
|
+continue;
|
|
|
+}
|
|
|
+if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
|
|
|
+r.label = i[1];
|
|
|
+break;
|
|
|
+}
|
|
|
+if (6 === i[0] && r.label < a[1]) {
|
|
|
+r.label = a[1];
|
|
|
+a = i;
|
|
|
+break;
|
|
|
+}
|
|
|
+if (a && r.label < a[2]) {
|
|
|
+r.label = a[2];
|
|
|
+r.ops.push(i);
|
|
|
+break;
|
|
|
+}
|
|
|
+a[2] && r.ops.pop();
|
|
|
+r.trys.pop();
|
|
|
+continue;
|
|
|
+}
|
|
|
+i = e.call(t, r);
|
|
|
+} catch (t) {
|
|
|
+i = [ 6, t ];
|
|
|
+n = 0;
|
|
|
+} finally {
|
|
|
+o = a = 0;
|
|
|
+}
|
|
|
+if (5 & i[0]) throw i[1];
|
|
|
+return {
|
|
|
+value: i[0] ? i[1] : void 0,
|
|
|
+done: !0
|
|
|
+};
|
|
|
+}
|
|
|
};
|
|
|
Object.defineProperty(o, "__esModule", {
|
|
|
value: !0
|
|
|
});
|
|
|
-var r = t("../../../before/util/Util"), c = t("../../../mk/system/JsbSystem"), s = cc._decorator, l = s.ccclass, p = s.property, u = function(t) {
|
|
|
+var s = t("../../../before/util/Util"), l = t("../../../mk/system/JsbSystem"), p = t("../../data/AdData"), u = t("../../data/GameData"), d = cc._decorator, h = d.ccclass, f = d.property, y = function(t) {
|
|
|
a(e, t);
|
|
|
function e() {
|
|
|
var e = null !== t && t.apply(this, arguments) || this;
|
|
|
@@ -21267,35 +21381,77 @@ 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() {
|
|
|
for (var o = 0; o < e; o++) {
|
|
|
-var n = r.default.rnd(0, 9);
|
|
|
+var n = s.default.rnd(0, 9);
|
|
|
t.lbl_value[o].string = "" + n;
|
|
|
}
|
|
|
}, .1);
|
|
|
};
|
|
|
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:
|
|
|
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() {
|
|
|
+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();
|
|
|
+t.label = 2;
|
|
|
+
|
|
|
+case 2:
|
|
|
+return [ 2 ];
|
|
|
+}
|
|
|
+});
|
|
|
+});
|
|
|
+});
|
|
|
+return [ 2 ];
|
|
|
+}
|
|
|
+});
|
|
|
+});
|
|
|
};
|
|
|
e.prototype.clickCloseBtn = function() {
|
|
|
mk.audio.playEffect("closeButton");
|
|
|
};
|
|
|
e.prototype.clickExitBtn = function() {
|
|
|
-c.default.systemExit();
|
|
|
+l.default.systemExit();
|
|
|
};
|
|
|
-i([ p({
|
|
|
+i([ f({
|
|
|
displayName: "数字组",
|
|
|
type: cc.Label
|
|
|
}) ], e.prototype, "lbl_value", void 0);
|
|
|
-return i([ l ], e);
|
|
|
+return i([ h ], e);
|
|
|
}(cc.Component);
|
|
|
-o.default = u;
|
|
|
+o.default = y;
|
|
|
cc._RF.pop();
|
|
|
}, {
|
|
|
"../../../before/util/Util": "Util",
|
|
|
-"../../../mk/system/JsbSystem": "JsbSystem"
|
|
|
+"../../../mk/system/JsbSystem": "JsbSystem",
|
|
|
+"../../data/AdData": "AdData",
|
|
|
+"../../data/GameData": "GameData"
|
|
|
} ],
|
|
|
ProductReward: [ function(t, e, o) {
|
|
|
"use strict";
|