|
|
@@ -265,26 +265,25 @@ e.prototype.onDisable = function() {
|
|
|
mk.ad.destoryBanner();
|
|
|
};
|
|
|
e.prototype.clickWatchVideo = function() {
|
|
|
-var t = this;
|
|
|
-mk.ad.watchAd(function(e) {
|
|
|
-mk.console.log("watchAD:" + e);
|
|
|
-if (e) {
|
|
|
+mk.ui.closePanel(this.node.name);
|
|
|
+mk.ad.watchAd(function(t) {
|
|
|
+mk.console.log("watchAD:" + t);
|
|
|
+if (t) {
|
|
|
gData.adClearSickData.clearSick();
|
|
|
-mk.ui.closePanel(t.node.name);
|
|
|
-var o = "";
|
|
|
+var e = "";
|
|
|
switch (gData.adClearSickData.tab) {
|
|
|
case s.ProductType.nzw:
|
|
|
-o = "已消灭害虫";
|
|
|
+e = "已消灭害虫";
|
|
|
break;
|
|
|
|
|
|
case s.ProductType.dw:
|
|
|
-o = "已恢复健康";
|
|
|
+e = "已恢复健康";
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
-o = "已恢复供电";
|
|
|
+e = "已恢复供电";
|
|
|
}
|
|
|
-mk.tip.pop(o);
|
|
|
+mk.tip.pop(e);
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
@@ -1029,12 +1028,124 @@ function o() {
|
|
|
this.constructor = t;
|
|
|
}
|
|
|
t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
|
|
|
+}), i = 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());
|
|
|
});
|
|
|
+}, r = 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
|
|
|
});
|
|
|
o.InterAdState = void 0;
|
|
|
-var i, r = t("../../zgSingleton"), c = t("./ATSDKMgr"), s = function(t) {
|
|
|
+var c, s = t("../../zgSingleton"), l = t("./ATSDKMgr"), p = function(t) {
|
|
|
a(e, t);
|
|
|
function e() {
|
|
|
var e = null !== t && t.apply(this, arguments) || this;
|
|
|
@@ -1043,39 +1154,62 @@ e.ifLoadShowArr = new Array();
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.init = function() {
|
|
|
+return i(this, void 0, void 0, function() {
|
|
|
+var t;
|
|
|
+return r(this, function(e) {
|
|
|
+switch (e.label) {
|
|
|
+case 0:
|
|
|
this.ATInterstitialJS = cc.ATInterstitialJS;
|
|
|
this.ATInterstitialJS.proxy = this;
|
|
|
this.ATInterstitialJS.init();
|
|
|
-for (var t = 0; t < 3; t++) {
|
|
|
-this.interAdStateArr[t] = i.Unload;
|
|
|
+t = 2;
|
|
|
+e.label = 1;
|
|
|
+
|
|
|
+case 1:
|
|
|
+if (!(t >= 0)) return [ 3, 4 ];
|
|
|
+this.interAdStateArr[t] = c.Unload;
|
|
|
this.loadInter(t);
|
|
|
+return [ 4, mk.time.WaitForSeconds(1) ];
|
|
|
+
|
|
|
+case 2:
|
|
|
+e.sent();
|
|
|
+e.label = 3;
|
|
|
+
|
|
|
+case 3:
|
|
|
+t--;
|
|
|
+return [ 3, 1 ];
|
|
|
+
|
|
|
+case 4:
|
|
|
+return [ 2 ];
|
|
|
}
|
|
|
+});
|
|
|
+});
|
|
|
};
|
|
|
e.prototype.getPlaceIDByType = function(t) {
|
|
|
var e = "";
|
|
|
switch (t) {
|
|
|
case 0:
|
|
|
-e = c.default.topon_inter_placementId;
|
|
|
+e = l.default.topon_inter_placementId;
|
|
|
break;
|
|
|
|
|
|
case 1:
|
|
|
-e = c.default.topon_fullinter_placementId;
|
|
|
+e = l.default.topon_fullinter_placementId;
|
|
|
break;
|
|
|
|
|
|
case 2:
|
|
|
-e = c.default.topon_biginter_placementId;
|
|
|
+e = l.default.topon_biginter_placementId;
|
|
|
}
|
|
|
return e;
|
|
|
};
|
|
|
e.prototype.checkPlacementIDType = function(t) {
|
|
|
if (cc.sys.os === cc.sys.OS_IOS) {
|
|
|
-if (t == c.default.topon_inter_placementId) return 0;
|
|
|
-if (t == c.default.topon_fullinter_placementId) return 1;
|
|
|
-if (t == c.default.topon_biginter_placementId) return 2;
|
|
|
+if (t == l.default.topon_inter_placementId) return 0;
|
|
|
+if (t == l.default.topon_fullinter_placementId) return 1;
|
|
|
+if (t == l.default.topon_biginter_placementId) return 2;
|
|
|
} else if (cc.sys.os === cc.sys.OS_ANDROID) {
|
|
|
-if (t == c.default.topon_inter_placementId) return 0;
|
|
|
-if (t == c.default.topon_fullinter_placementId) return 1;
|
|
|
-if (t == c.default.topon_biginter_placementId) return 2;
|
|
|
+if (t == l.default.topon_inter_placementId) return 0;
|
|
|
+if (t == l.default.topon_fullinter_placementId) return 1;
|
|
|
+if (t == l.default.topon_biginter_placementId) return 2;
|
|
|
}
|
|
|
};
|
|
|
e.prototype.hasAdReady = function(t) {
|
|
|
@@ -1083,39 +1217,40 @@ return this.ATInterstitialJS.hasAdReady(this.getPlaceIDByType(t));
|
|
|
};
|
|
|
e.prototype.loadInter = function(t, e) {
|
|
|
void 0 === e && (e = !1);
|
|
|
+mk.console.logSingle("ATInterstitialJS ", "loadInter " + t);
|
|
|
this.ifLoadShowArr[t] = e;
|
|
|
-this.interAdStateArr[t] = i.Loading;
|
|
|
+this.interAdStateArr[t] = c.Loading;
|
|
|
var o = this.getPlaceIDByType(t);
|
|
|
this.ATInterstitialJS.loadInter(o);
|
|
|
};
|
|
|
e.prototype.showInter = function(t) {
|
|
|
-if (this.interAdStateArr[t] == i.Show) console.log("当前插屏类型正在展示"); else {
|
|
|
-mk.console.logSingle("inter ", "showInter " + t);
|
|
|
+if (this.interAdStateArr[t] == c.Show) console.log("当前插屏类型正在展示"); else {
|
|
|
+mk.console.logSingle("ATInterstitialJS ", "showInter " + t);
|
|
|
if (this.hasAdReady(t)) {
|
|
|
-this.interAdStateArr[t] = i.Show;
|
|
|
+this.interAdStateArr[t] = c.Show;
|
|
|
this.ATInterstitialJS.showInter(this.getPlaceIDByType(t));
|
|
|
-} else this.interAdStateArr[t] == i.Loading ? this.ifLoadShowArr[t] = !0 : this.loadInter(t, !0);
|
|
|
+} else this.interAdStateArr[t] == c.Loading ? this.ifLoadShowArr[t] = !0 : this.loadInter(t, !0);
|
|
|
}
|
|
|
};
|
|
|
e.prototype.onInterstitialAdLoaded = function(t) {
|
|
|
var e = this.checkPlacementIDType(t);
|
|
|
-this.interAdStateArr[e] = i.LoadSuccess;
|
|
|
-mk.console.logSingle("inter ", "onInterstitialAdLoaded " + e);
|
|
|
+this.interAdStateArr[e] = c.LoadSuccess;
|
|
|
+mk.console.logSingle("ATInterstitialJS ", "onInterstitialAdLoaded " + e);
|
|
|
this.ifLoadShowArr[e] && this.showInter(e);
|
|
|
};
|
|
|
e.prototype.onInterstitialAdLoadFail = function(t) {
|
|
|
var e = this.checkPlacementIDType(t);
|
|
|
-this.interAdStateArr[e] = i.LoadFail;
|
|
|
+this.interAdStateArr[e] = c.LoadFail;
|
|
|
var o = 11;
|
|
|
-mk.console.logSingle("inter ", "onInterstitialAdLoadFail " + e);
|
|
|
+mk.console.logSingle("ATInterstitialJS ", "onInterstitialAdLoadFail " + e);
|
|
|
0 == e ? o = 11 : 1 == e && (o = 10);
|
|
|
gData.adData.updateADLog(o, t);
|
|
|
};
|
|
|
e.prototype.onInterstitialAdShow = function(t, e) {
|
|
|
var o = this.checkPlacementIDType(t);
|
|
|
-this.interAdStateArr[o] = i.Show;
|
|
|
+this.interAdStateArr[o] = c.Show;
|
|
|
var n = JSON.parse(e), a = 2;
|
|
|
-mk.console.logSingle("inter ", "onInterstitialAdShow " + o);
|
|
|
+mk.console.logSingle("ATInterstitialJS ", "onInterstitialAdShow " + o);
|
|
|
0 == o ? a = 2 : 1 == o && (a = 9);
|
|
|
gData.adData.updateADLog(a, t, n);
|
|
|
this.loadInter(o);
|
|
|
@@ -1123,7 +1258,7 @@ this.loadInter(o);
|
|
|
e.prototype.onInterstitialAdClick = function() {};
|
|
|
e.prototype.onInterstitialAdClose = function(t, e) {
|
|
|
var o = this.checkPlacementIDType(t);
|
|
|
-this.interAdStateArr[o] = i.Close;
|
|
|
+this.interAdStateArr[o] = c.Close;
|
|
|
if (0 == o) ; else if (1 == o) {
|
|
|
var n = JSON.parse(e);
|
|
|
gData.adData.updateADLog(8, t, n);
|
|
|
@@ -1134,8 +1269,8 @@ mk.console.logSingle("onInterstitialAdFailedToPlayVideo placementId >> ", t);
|
|
|
mk.console.logSingle("onInterstitialAdFailedToPlayVideo ", e);
|
|
|
};
|
|
|
return e;
|
|
|
-}(r.zgSingleton);
|
|
|
-o.default = s;
|
|
|
+}(s.zgSingleton);
|
|
|
+o.default = p;
|
|
|
(function(t) {
|
|
|
t[t.Unload = 0] = "Unload";
|
|
|
t[t.Loading = 1] = "Loading";
|
|
|
@@ -1143,7 +1278,7 @@ t[t.LoadSuccess = 2] = "LoadSuccess";
|
|
|
t[t.LoadFail = 3] = "LoadFail";
|
|
|
t[t.Show = 4] = "Show";
|
|
|
t[t.Close = 5] = "Close";
|
|
|
-})(i = o.InterAdState || (o.InterAdState = {}));
|
|
|
+})(c = o.InterAdState || (o.InterAdState = {}));
|
|
|
cc._RF.pop();
|
|
|
}, {
|
|
|
"../../zgSingleton": "zgSingleton",
|
|
|
@@ -7730,6 +7865,9 @@ gData.adData.checkPopRed();
|
|
|
gData.gameData.isProducting = !1;
|
|
|
}
|
|
|
};
|
|
|
+e.prototype.clickSpeedUp = function() {
|
|
|
+mk.ui.openPanel("module/speedUpUI/speedUp");
|
|
|
+};
|
|
|
e.prototype.onRipe = function() {
|
|
|
this._state = s.FactroyState.Ripe;
|
|
|
this.data.state = s.FactroyState.Ripe;
|
|
|
@@ -8659,9 +8797,13 @@ case 1:
|
|
|
e.spriteFrame = o.sent();
|
|
|
this.plantIcon.getComponent(cc.Animation).play();
|
|
|
this.plantIcon.getComponent(cc.Animation).on(cc.Animation.EventType.FINISHED, this.onPlantAnimationFinish, this);
|
|
|
-o.label = 2;
|
|
|
+return [ 3, 3 ];
|
|
|
|
|
|
case 2:
|
|
|
+mk.tip.pop("农田已满,无法继续生产");
|
|
|
+o.label = 3;
|
|
|
+
|
|
|
+case 3:
|
|
|
return [ 2 ];
|
|
|
}
|
|
|
});
|
|
|
@@ -9365,7 +9507,6 @@ this.farms[t.sortID] = t;
|
|
|
};
|
|
|
t.prototype.plant = function(t) {
|
|
|
this.currSelectFarm && this.currSelectFarm.plant(t);
|
|
|
-this._lastSeletFarm = this._currSelectFarm;
|
|
|
};
|
|
|
t.prototype.selectNextFarm = function(t) {
|
|
|
void 0 === t && (t = !0);
|
|
|
@@ -10536,7 +10677,7 @@ Object.defineProperty(o, "__esModule", {
|
|
|
value: !0
|
|
|
});
|
|
|
o.Fun = void 0;
|
|
|
-var n, a = t("./AppData"), i = t("./GameData"), r = t("./HttpData"), c = t("./LoginData"), s = t("./StorageData"), l = t("./WechatData"), p = t("./module/HelpData"), u = t("./module/PigBankData"), d = t("./module/TurnableData"), h = t("./module/SignData"), f = t("./module/FissionData"), y = t("./AdData"), g = t("./module/RewardData"), m = t("./module/CashNormalData"), _ = t("./module/ReceiptNoticeData"), v = t("./module/BlessingBagData"), b = t("./module/CashProData"), D = t("./module/RedBagCashData"), w = t("./module/RedCodeData"), S = t("./module/RedeemData"), A = t("./module/MoreGameData"), P = t("./module/SettingData"), k = t("./module/GuideData"), O = t("./module/GuideWeakData"), I = t("./ConfigData"), R = t("./module/NewCashUIData"), T = t("../../before/view/data/ADUnlockData"), C = t("../../before/view/data/PlantData"), N = t("../../before/main/FarmSystem"), x = t("../../before/view/data/HarvestData"), j = t("../../before/view/data/ADClearSickData"), F = t("../../before/main/PastureSystem"), M = t("../../before/main/FactorySystem"), B = t("./module/FarmMapData"), L = t("./module/GradeRewardData"), E = t("./module/WalletCashOutData"), G = function() {
|
|
|
+var n, a = t("./AppData"), i = t("./GameData"), r = t("./HttpData"), c = t("./LoginData"), s = t("./StorageData"), l = t("./WechatData"), p = t("./module/HelpData"), u = t("./module/PigBankData"), d = t("./module/TurnableData"), h = t("./module/SignData"), f = t("./module/FissionData"), y = t("./AdData"), g = t("./module/RewardData"), m = t("./module/CashNormalData"), _ = t("./module/ReceiptNoticeData"), v = t("./module/BlessingBagData"), b = t("./module/CashProData"), D = t("./module/RedBagCashData"), w = t("./module/RedCodeData"), S = t("./module/RedeemData"), A = t("./module/MoreGameData"), P = t("./module/SettingData"), k = t("./module/GuideData"), O = t("./module/GuideWeakData"), I = t("./ConfigData"), R = t("./module/NewCashUIData"), T = t("../../before/view/data/ADUnlockData"), C = t("../../before/view/data/PlantData"), N = t("../../before/main/FarmSystem"), x = t("../../before/view/data/HarvestData"), j = t("../../before/view/data/ADClearSickData"), F = t("../../before/main/PastureSystem"), M = t("../../before/main/FactorySystem"), B = t("./module/FarmMapData"), L = t("./module/GradeRewardData"), E = t("./module/WalletCashOutData"), U = function() {
|
|
|
function t() {
|
|
|
this.init();
|
|
|
}
|
|
|
@@ -10601,7 +10742,7 @@ t[t.cashNormal = 7] = "cashNormal";
|
|
|
t[t.redBagCash = 8] = "redBagCash";
|
|
|
t[t.redeem = 9] = "redeem";
|
|
|
})(n = o.Fun || (o.Fun = {}));
|
|
|
-window.gData = new G();
|
|
|
+window.gData = new U();
|
|
|
cc._RF.pop();
|
|
|
}, {
|
|
|
"../../before/main/FactorySystem": "FactorySystem",
|
|
|
@@ -11471,6 +11612,7 @@ this._maxProduct.length <= 0 && (this._maxProduct = this.getProp(i.maxProduct));
|
|
|
};
|
|
|
t.prototype.initProductTimes = function() {
|
|
|
this._productMakeTimesData = this.getProp(i.productMakeTimes);
|
|
|
+this._productMakeTimesData || (this._productMakeTimesData = []);
|
|
|
for (var t = this._productMakeTimesData.length, e = 0; e < t; e++) this._productMakeTimesMap.set(this._productMakeTimesData[e].id, this._productMakeTimesData[e].times);
|
|
|
};
|
|
|
t.prototype.checkGradeUpUnLock = function() {
|
|
|
@@ -14138,6 +14280,7 @@ return e ? [ 4, gData.adData.watchVideo(s.AdFun.harvest) ] : [ 3, 3 ];
|
|
|
|
|
|
case 1:
|
|
|
t.sent();
|
|
|
+gData.harvestData.setToEmpty();
|
|
|
return [ 4, gData.farmGradeData.addGradeExp(l.ExpAddType.EAT_harvest) ];
|
|
|
|
|
|
case 2:
|
|
|
@@ -18946,6 +19089,9 @@ gData.gameData.init_leftTimes = !0;
|
|
|
gData.gameData.isProducting = !1;
|
|
|
}
|
|
|
};
|
|
|
+e.prototype.clickSpeedUp = function() {
|
|
|
+mk.ui.openPanel("module/speedUpUI/speedUp");
|
|
|
+};
|
|
|
e.prototype.onRipe = function() {
|
|
|
this._state = s.PastureState.Ripe;
|
|
|
this.data.state = s.PastureState.Ripe;
|
|
|
@@ -19712,7 +19858,7 @@ return [ 2 ];
|
|
|
e.prototype.clickMake = function() {
|
|
|
if (this.data.tab == l.ProductType.nzw) {
|
|
|
gData.farmSystem.plant(this.data.picture);
|
|
|
-gData.farmSystem.selectNextFarm();
|
|
|
+gData.farmSystem.selectNextFarm(!1);
|
|
|
} else gData.factorySystem.make(this.data.picture);
|
|
|
};
|
|
|
e.prototype.getDesByType = function() {
|