|
|
@@ -46,7 +46,16 @@ this.curConfigID = e;
|
|
|
mk.ui.openPanel("game/prefab/uiPanel/ADClearSickPanel");
|
|
|
};
|
|
|
t.prototype.clearSick = function() {
|
|
|
-this.tab == a.ProductType.nzw ? gData.gameData.getFarmDataMap(this.curConfigID).state = a.FarmState.Ripe : this.tab == a.ProductType.dw ? gData.gameData.getPastureDataMap(this.curConfigID).state = a.PastureState.Ripe : gData.gameData.getFactoryDataMap(this.curConfigID).state = a.FactroyState.Ripe;
|
|
|
+if (this.tab == a.ProductType.nzw) {
|
|
|
+gData.gameData.getFarmDataMap(this.curConfigID).state = a.FarmState.Ripe;
|
|
|
+gData.gameData.RawInsectCurArr[0] > 0 && gData.gameData.RawInsectCurArr[0]--;
|
|
|
+} else if (this.tab == a.ProductType.dw) {
|
|
|
+gData.gameData.getPastureDataMap(this.curConfigID).state = a.PastureState.Ripe;
|
|
|
+gData.gameData.RawInsectCurArr[1] > 0 && gData.gameData.RawInsectCurArr[1]--;
|
|
|
+} else {
|
|
|
+gData.gameData.getFactoryDataMap(this.curConfigID).state = a.FactroyState.Ripe;
|
|
|
+gData.gameData.RawInsectCurArr[2] > 0 && gData.gameData.RawInsectCurArr[2]--;
|
|
|
+}
|
|
|
gData.gameData.needFreshArr.push(this.curConfigID);
|
|
|
};
|
|
|
return n([ i ], t);
|
|
|
@@ -258,7 +267,7 @@ return [ 2 ];
|
|
|
});
|
|
|
};
|
|
|
e.prototype.onEnable = function() {
|
|
|
-gData.gameData.playerProp.completeFarmTaskTimes >= 1 && gData.adData.checkPopInter(s.InterAdType.interstitial1_click_3);
|
|
|
+gData.adData.checkPopInter(s.InterAdType.interstitial1_click_3);
|
|
|
mk.ad.showBanner(s.BannerAdType.banner_click_8);
|
|
|
};
|
|
|
e.prototype.onDisable = function() {
|
|
|
@@ -867,10 +876,11 @@ e.prototype.destroyBanner = function() {
|
|
|
this.bannerAdState = i.Close;
|
|
|
this.ifLoadShow = !1;
|
|
|
this.ATBannerJS.destroyBanner();
|
|
|
+this.loadBanner();
|
|
|
};
|
|
|
e.prototype.onBannerAdLoaded = function() {
|
|
|
this.bannerAdState = i.LoadSuccess;
|
|
|
-mk.console.logSingle("banner ", "onBannerAdLoaded");
|
|
|
+mk.console.logSingle("banner ", "onBannerAdLoaded " + this.ifLoadShow);
|
|
|
this.ifLoadShow && this.showBanner();
|
|
|
};
|
|
|
e.prototype.onBannerAdLoadFail = function(t) {
|
|
|
@@ -879,16 +889,18 @@ gData.adData.updateADLog(14, t);
|
|
|
mk.console.logSingle("banner ", "onBannerAdLoadFail");
|
|
|
};
|
|
|
e.prototype.onBannerAdShow = function(t, e) {
|
|
|
+this.ifLoadShow = !1;
|
|
|
this.bannerAdState = i.Show;
|
|
|
mk.console.logSingle("banner ", "onBannerAdShow");
|
|
|
var o = JSON.parse(e);
|
|
|
gData.adData.updateADLog(7, t, o);
|
|
|
-this.loadBanner();
|
|
|
};
|
|
|
e.prototype.onBannerAdClick = function() {
|
|
|
mk.data.sendDataEvent(r.DataEventId.Ad_click, mk.ad.bannerAdType);
|
|
|
};
|
|
|
-e.prototype.onBannerAdAutoRefresh = function() {};
|
|
|
+e.prototype.onBannerAdAutoRefresh = function() {
|
|
|
+mk.console.logSingle("banner ", "onBannerAdAutoRefresh");
|
|
|
+};
|
|
|
e.prototype.onBannerAdAutoRefreshFail = function() {};
|
|
|
e.prototype.onBannerAdCloseButtonTapped = function() {};
|
|
|
return e;
|
|
|
@@ -1265,6 +1277,7 @@ this.ifLoadShowArr[e] && this.showInter(e);
|
|
|
e.prototype.onInterstitialAdLoadFail = function(t) {
|
|
|
var e = this.checkPlacementIDType(t);
|
|
|
this.interAdStateArr[e] = c.LoadFail;
|
|
|
+this.ifLoadShowArr[e] = !1;
|
|
|
var o = 11;
|
|
|
mk.console.logSingle("ATInterstitialJS ", "onInterstitialAdLoadFail " + e);
|
|
|
0 == e ? o = 11 : 1 == e && (o = 10);
|
|
|
@@ -1272,6 +1285,7 @@ gData.adData.updateADLog(o, t);
|
|
|
};
|
|
|
e.prototype.onInterstitialAdShow = function(t, e) {
|
|
|
var o = this.checkPlacementIDType(t);
|
|
|
+this.ifLoadShowArr[o] = !1;
|
|
|
this.interAdStateArr[o] = c.Show;
|
|
|
var n = JSON.parse(e), a = 2;
|
|
|
mk.console.logSingle("ATInterstitialJS ", "onInterstitialAdShow " + o);
|
|
|
@@ -1661,10 +1675,12 @@ this.ifLoadShow && this.showNative(this.nativeAdType);
|
|
|
};
|
|
|
e.prototype.onNativeAdLoadFail = function(t) {
|
|
|
this.nativeAdState = i.LoadFail;
|
|
|
+this.ifLoadShow = !1;
|
|
|
gData.adData.updateADLog(12, t);
|
|
|
};
|
|
|
e.prototype.onNativeAdShow = function(t, e) {
|
|
|
this.nativeAdState = i.Show;
|
|
|
+this.ifLoadShow = !1;
|
|
|
var o = JSON.parse(e);
|
|
|
gData.adData.updateADLog(3, t, o);
|
|
|
};
|
|
|
@@ -1801,19 +1817,20 @@ this.ATRewardVideoJS.loadAd(gData.loginData.uin, "userDataKey");
|
|
|
};
|
|
|
e.prototype.showAd = function() {
|
|
|
if (this.reawardAdState == i.LoadSuccess) this.ATRewardVideoJS.showAd(); else {
|
|
|
-this.loadAd();
|
|
|
this.ifLoadShow = !0;
|
|
|
+this.loadAd();
|
|
|
}
|
|
|
};
|
|
|
e.prototype.onRewardedVideoAdLoaded = function() {
|
|
|
console.log("anythink === 加载激励视频广告成功", this.hasAdReady(), i[this.reawardAdState]);
|
|
|
this.reawardAdState = i.LoadSuccess;
|
|
|
if (this.ifLoadShow) {
|
|
|
-this.showAd();
|
|
|
this.ifLoadShow = !1;
|
|
|
+this.showAd();
|
|
|
}
|
|
|
};
|
|
|
e.prototype.onRewardedVideoAdFailed = function() {
|
|
|
+this.ifLoadShow = !1;
|
|
|
console.log("anythink === 加载激励视频广告失败", i[this.reawardAdState]);
|
|
|
this.reawardAdState = i.LoadFail;
|
|
|
};
|
|
|
@@ -6371,15 +6388,12 @@ return r(this, void 0, void 0, function() {
|
|
|
return c(this, function(t) {
|
|
|
switch (t.label) {
|
|
|
case 0:
|
|
|
-return [ 4, mk.time.WaitForSeconds(1) ];
|
|
|
+return [ 4, mk.time.WaitForSeconds(2) ];
|
|
|
|
|
|
case 1:
|
|
|
t.sent();
|
|
|
this.loadPart.active = !1;
|
|
|
this.cashPro.active = !0;
|
|
|
-mk.tween.move(this.cashPro, .3, cc.v2(1e3, 0), cc.v2(0, 0), function() {
|
|
|
-gData.adData.checkShowFullInter(1);
|
|
|
-}, "elasticIn");
|
|
|
mk.data.setTAEventUser(1, "cash_time", 1);
|
|
|
mk.data.setTAEventUser(1, "cash_total", gData.cashPro.cashPro_money / 100);
|
|
|
this.labMoney.string = "¥" + (gData.cashPro.cashPro_money / 100).toFixed(2);
|
|
|
@@ -6393,6 +6407,9 @@ console.log("tixianFail ");
|
|
|
this.loadPart.active = !1;
|
|
|
mk.ui.closePanel(this.node.name);
|
|
|
};
|
|
|
+e.prototype.clickCloseBtn = function() {
|
|
|
+gData.gameData.init_redBagTask = !0;
|
|
|
+};
|
|
|
i([ p(cc.Node) ], e.prototype, "loadPart", void 0);
|
|
|
i([ p(cc.Animation) ], e.prototype, "loadAni", void 0);
|
|
|
i([ p(cc.Node) ], e.prototype, "cashPro", void 0);
|
|
|
@@ -8054,7 +8071,7 @@ switch (this.data.state) {
|
|
|
case s.FactroyState.Lock:
|
|
|
t = gData.gameData.getProductArrByType(this.tab);
|
|
|
e = t[0].value;
|
|
|
-mk.tip.pop("农场达到" + e + "级解锁");
|
|
|
+mk.tip.pop("完成" + e + "次任务红包后解锁");
|
|
|
break;
|
|
|
|
|
|
case s.FactroyState.Empty:
|
|
|
@@ -8115,7 +8132,7 @@ this.data.productID = 0;
|
|
|
this.data.growSpan = 0;
|
|
|
gData.gameData.setFactoryDataMap(this.configID, this.data);
|
|
|
gData.gameData.setNextProduct(!1);
|
|
|
-gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node);
|
|
|
+0 == gData.harvestData.getType ? gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node) : gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_others, this.node);
|
|
|
};
|
|
|
i([ y({
|
|
|
type: u.FarmCountDown,
|
|
|
@@ -8337,7 +8354,7 @@ Object.defineProperty(o, "__esModule", {
|
|
|
value: !0
|
|
|
});
|
|
|
o.FarmCountDown = void 0;
|
|
|
-var s = t("../../game/component/BitmapFontC"), l = t("../util/Util"), p = cc._decorator, u = p.ccclass, d = p.property, h = function(t) {
|
|
|
+var s = t("../../game/component/BitmapFontC"), l = t("../../game/data/GameData"), p = t("../util/Util"), u = cc._decorator, d = u.ccclass, h = u.property, f = function(t) {
|
|
|
a(e, t);
|
|
|
function e() {
|
|
|
var e = null !== t && t.apply(this, arguments) || this;
|
|
|
@@ -8355,31 +8372,32 @@ e.ripeTime = 0;
|
|
|
e.totleTime = 0;
|
|
|
e.isDataed = !1;
|
|
|
e.isRipeInit = !1;
|
|
|
+e.productConfig = null;
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.setData = function(t) {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
-var e, o;
|
|
|
-return c(this, function(n) {
|
|
|
-switch (n.label) {
|
|
|
+var e;
|
|
|
+return c(this, function(o) {
|
|
|
+switch (o.label) {
|
|
|
case 0:
|
|
|
if (this.isDataed) return [ 3, 2 ];
|
|
|
this.isDataed = !0;
|
|
|
-e = gData.gameData.getProductMap(t.productID);
|
|
|
+this.productConfig = gData.gameData.getProductMap(t.productID);
|
|
|
this.ripeTime = t.growSpan;
|
|
|
-this.totleTime = e.time;
|
|
|
+this.totleTime = this.productConfig.time;
|
|
|
this.normalGroup.active = !0;
|
|
|
this.sickIcon.active = !1;
|
|
|
this.counting = !0;
|
|
|
this.normalCount.string = "";
|
|
|
this.normalProgress.fillRange = 0;
|
|
|
if (!this.clockIcon) return [ 3, 2 ];
|
|
|
-o = this.clockIcon;
|
|
|
-return [ 4, mk.loader.load("game/coregame/texture/factory_icons/factory_" + e.picture, cc.SpriteFrame) ];
|
|
|
+e = this.clockIcon;
|
|
|
+return [ 4, mk.loader.load("game/coregame/texture/factory_icons/factory_" + this.productConfig.picture, cc.SpriteFrame) ];
|
|
|
|
|
|
case 1:
|
|
|
-o.spriteFrame = n.sent();
|
|
|
-n.label = 2;
|
|
|
+e.spriteFrame = o.sent();
|
|
|
+o.label = 2;
|
|
|
|
|
|
case 2:
|
|
|
return [ 2 ];
|
|
|
@@ -8390,7 +8408,7 @@ return [ 2 ];
|
|
|
e.prototype.update = function() {
|
|
|
var t = Date.now();
|
|
|
if (this.counting && t < this.ripeTime) {
|
|
|
-var e = l.default.ParseTime2Format(Math.floor(.001 * (this.ripeTime - t)), "m:s");
|
|
|
+var e = p.default.ParseTime2Format(Math.floor(.001 * (this.ripeTime - t)), "m:s");
|
|
|
this.normalCount.string = e;
|
|
|
this.normalProgress.fillRange = 1 - (this.ripeTime - t) / (1e3 * this.totleTime);
|
|
|
} else if (this.counting && t > this.ripeTime && !this.isRipeInit) {
|
|
|
@@ -8431,7 +8449,18 @@ return [ 2 ];
|
|
|
e.prototype.riped = function() {
|
|
|
this.counting = !1;
|
|
|
this.normalGroup.active = !1;
|
|
|
-if (Math.random() < .2) {
|
|
|
+var t = !1;
|
|
|
+if (gData.gameData.playerProp.completeFarmTaskTimes >= 1 && Math.random() < .2) if (this.productConfig.tab == l.ProductType.nzw && gData.gameData.RawInsectCurArr[0] < parseInt(gData.gameData.RawInsectArr[0])) {
|
|
|
+t = !0;
|
|
|
+gData.gameData.RawInsectCurArr[0]++;
|
|
|
+} else if (this.productConfig.tab == l.ProductType.dw && gData.gameData.RawInsectCurArr[1] < parseInt(gData.gameData.RawInsectArr[1])) {
|
|
|
+t = !0;
|
|
|
+gData.gameData.RawInsectCurArr[1]++;
|
|
|
+} else if (gData.gameData.RawInsectCurArr[2] < parseInt(gData.gameData.RawInsectArr[2])) {
|
|
|
+t = !0;
|
|
|
+gData.gameData.RawInsectCurArr[2]++;
|
|
|
+}
|
|
|
+if (t) {
|
|
|
this.sickIcon.active = !0;
|
|
|
this.onSick && this.onSick.emit(null);
|
|
|
} else {
|
|
|
@@ -8439,48 +8468,49 @@ this.ripedIcon.active = !0;
|
|
|
this.onRiped && this.onRiped.emit(null);
|
|
|
}
|
|
|
};
|
|
|
-i([ d({
|
|
|
+i([ h({
|
|
|
type: cc.Component.EventHandler,
|
|
|
tooltip: "成熟回调"
|
|
|
}) ], e.prototype, "onRiped", void 0);
|
|
|
-i([ d({
|
|
|
+i([ h({
|
|
|
type: cc.Component.EventHandler,
|
|
|
tooltip: "生虫回调"
|
|
|
}) ], e.prototype, "onSick", void 0);
|
|
|
-i([ d({
|
|
|
+i([ h({
|
|
|
type: cc.Component.EventHandler,
|
|
|
tooltip: "加速按钮回调"
|
|
|
}) ], e.prototype, "onSpeedButton", void 0);
|
|
|
-i([ d({
|
|
|
+i([ h({
|
|
|
type: cc.Node,
|
|
|
tooltip: "常驻计时器组"
|
|
|
}) ], e.prototype, "normalGroup", void 0);
|
|
|
-i([ d({
|
|
|
+i([ h({
|
|
|
type: cc.Sprite,
|
|
|
tooltip: "常驻进度条"
|
|
|
}) ], e.prototype, "normalProgress", void 0);
|
|
|
-i([ d({
|
|
|
+i([ h({
|
|
|
type: s.BitmapFontC,
|
|
|
tooltip: "常驻计时"
|
|
|
}) ], e.prototype, "normalCount", void 0);
|
|
|
-i([ d({
|
|
|
+i([ h({
|
|
|
type: cc.Node,
|
|
|
tooltip: "可收获图标"
|
|
|
}) ], e.prototype, "ripedIcon", void 0);
|
|
|
-i([ d({
|
|
|
+i([ h({
|
|
|
type: cc.Node,
|
|
|
tooltip: "生病图标"
|
|
|
}) ], e.prototype, "sickIcon", void 0);
|
|
|
-i([ d({
|
|
|
+i([ h({
|
|
|
type: cc.Sprite,
|
|
|
tooltip: "生病图标"
|
|
|
}) ], e.prototype, "clockIcon", void 0);
|
|
|
-return i([ u ], e);
|
|
|
+return i([ d ], e);
|
|
|
}(cc.Component);
|
|
|
-o.FarmCountDown = h;
|
|
|
+o.FarmCountDown = f;
|
|
|
cc._RF.pop();
|
|
|
}, {
|
|
|
"../../game/component/BitmapFontC": "BitmapFontC",
|
|
|
+"../../game/data/GameData": "GameData",
|
|
|
"../util/Util": "Util"
|
|
|
} ],
|
|
|
FarmGrowProcess: [ function(t, e, o) {
|
|
|
@@ -9055,7 +9085,7 @@ this.data.productID = 0;
|
|
|
this.data.growSpan = 0;
|
|
|
gData.gameData.setFarmDataMap(this.configID, this.data);
|
|
|
gData.gameData.setNextProduct(!1);
|
|
|
-gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node);
|
|
|
+0 == gData.harvestData.getType ? gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node) : gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_others, this.node);
|
|
|
var t = this.node.getChildByName("hb");
|
|
|
this.node.removeChild(t);
|
|
|
};
|
|
|
@@ -11819,6 +11849,8 @@ this.shareUrl = "";
|
|
|
this.shareTitle = "";
|
|
|
this.shareDes = "";
|
|
|
this.shareImgUrl = "";
|
|
|
+this.RawInsectArr = [];
|
|
|
+this.RawInsectCurArr = [ 0, 0, 0 ];
|
|
|
this._farmMapRewardData = [];
|
|
|
this._farmData = [];
|
|
|
this._farmDataMap = new Map();
|
|
|
@@ -11889,6 +11921,7 @@ gData.gameData.shareUrl = this.configs.ServerConfig.shareUrl;
|
|
|
gData.gameData.shareTitle = this.configs.ServerConfig.shareTitle;
|
|
|
gData.gameData.shareDes = this.configs.ServerConfig.shareDes;
|
|
|
gData.gameData.shareImgUrl = this.configs.ServerConfig.shareImgUrl;
|
|
|
+gData.gameData.RawInsectArr = this.configs.ServerConfig.RawInsect.split(",");
|
|
|
};
|
|
|
t.prototype.initPlayerProp = function(t) {
|
|
|
this.playerProp = new d();
|
|
|
@@ -12223,7 +12256,14 @@ e++;
|
|
|
}
|
|
|
this.setMaxProduct(p.nzw, 10003);
|
|
|
this.setProp(i.farmData, this._farmData);
|
|
|
-} else for (n = 0; n < t; n++) this._farmDataMap.set(this._farmData[n].id, this._farmData[n]);
|
|
|
+} else {
|
|
|
+var a = 0;
|
|
|
+for (n = 0; n < t; n++) {
|
|
|
+this._farmDataMap.set(this._farmData[n].id, this._farmData[n]);
|
|
|
+this._farmData[n].state == s.Sick && a++;
|
|
|
+}
|
|
|
+this.RawInsectCurArr[0] = a;
|
|
|
+}
|
|
|
};
|
|
|
t.prototype.setProductMapFromJson = function() {
|
|
|
for (var t = this.configs.Product, e = t.length, o = null, n = "", a = [], i = 0; i < e; i++) {
|
|
|
@@ -12310,7 +12350,14 @@ this._pastureDataMap.set(n, a);
|
|
|
n++;
|
|
|
}
|
|
|
this.setProp(i.pastureData, this._pastureData);
|
|
|
-} else for (r = 0; r < t; r++) this._pastureDataMap.set(this._pastureData[r].id, this._pastureData[r]);
|
|
|
+} else {
|
|
|
+var c = 0;
|
|
|
+for (r = 0; r < t; r++) {
|
|
|
+this._pastureDataMap.set(this._pastureData[r].id, this._pastureData[r]);
|
|
|
+this._pastureData[r].state == l.Sick && c++;
|
|
|
+}
|
|
|
+this.RawInsectCurArr[1] = c;
|
|
|
+}
|
|
|
};
|
|
|
t.prototype.setFactoryDataMap = function(t, e, o) {
|
|
|
void 0 === o && (o = !0);
|
|
|
@@ -12355,7 +12402,14 @@ e++;
|
|
|
}
|
|
|
this.setProp(i.maxProduct, this._maxProduct);
|
|
|
this.setProp(i.factoryData, this._factoryData);
|
|
|
-} else for (a = 0; a < t; a++) this._factoryDataMap.set(this._factoryData[a].id, this._factoryData[a]);
|
|
|
+} else {
|
|
|
+var c = 0;
|
|
|
+for (a = 0; a < t; a++) {
|
|
|
+this._factoryDataMap.set(this._factoryData[a].id, this._factoryData[a]);
|
|
|
+this._factoryData[a].state == u.Sick && c++;
|
|
|
+}
|
|
|
+this.RawInsectCurArr[2] = c;
|
|
|
+}
|
|
|
};
|
|
|
t.prototype.getTabByConfigID = function(t) {
|
|
|
var e = p.bmhc;
|
|
|
@@ -12746,6 +12800,7 @@ t.banner_click_9 = "抽奖";
|
|
|
(function(t) {
|
|
|
t[t.EAT_video = 1] = "EAT_video";
|
|
|
t[t.EAT_harvest = 2] = "EAT_harvest";
|
|
|
+t[t.EAT_others = 3] = "EAT_others";
|
|
|
})(o.ExpAddType || (o.ExpAddType = {}));
|
|
|
(function(t) {
|
|
|
t[t.Lock = 0] = "Lock";
|
|
|
@@ -13348,9 +13403,9 @@ mk.data.sendDataEvent(l.DataEventId.button_click, "任务红包icon");
|
|
|
};
|
|
|
e.prototype.onClickPlant = function() {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
-var t, e;
|
|
|
-return c(this, function(o) {
|
|
|
-switch (o.label) {
|
|
|
+var t, e, o, n;
|
|
|
+return c(this, function(a) {
|
|
|
+switch (a.label) {
|
|
|
case 0:
|
|
|
mk.audio.playEffect("button");
|
|
|
if (gData.gameData.leftTimes <= 0) {
|
|
|
@@ -13364,11 +13419,15 @@ return [ 2 ];
|
|
|
return [ 4, gData.gameData.makeProduct() ];
|
|
|
|
|
|
case 1:
|
|
|
-t = o.sent();
|
|
|
-gData.gameData.playerProp.gradeLevel < 2 && mk.tip.pop("生产次数+1");
|
|
|
+t = a.sent();
|
|
|
+if (gData.gameData.playerProp.userFarmTaskInfo) {
|
|
|
+e = gData.gameData.playerProp.userFarmTaskInfo.completeCount;
|
|
|
+o = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
|
|
|
+if (e >= o) return [ 2 ];
|
|
|
+}
|
|
|
if (t) {
|
|
|
-e = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
|
|
|
-mk.fly.PlayCoinAnim(1, 3, this.btn_product, e, function() {
|
|
|
+n = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
|
|
|
+mk.fly.PlayCoinAnim(1, 3, this.btn_product, n, function() {
|
|
|
gData.gameData.init_task = !0;
|
|
|
}, .8);
|
|
|
}
|
|
|
@@ -15078,6 +15137,7 @@ e.configID = null;
|
|
|
e.plantID = null;
|
|
|
e.config = null;
|
|
|
e.call = null;
|
|
|
+e.getType = 0;
|
|
|
e.init_reward = !1;
|
|
|
return e;
|
|
|
}
|
|
|
@@ -15270,6 +15330,7 @@ return [ 4, mk.http.sendData("redMoney/addRedMoneyByFarm", t) ];
|
|
|
case 1:
|
|
|
if ((e = n.sent()) && 0 != e.errcode) return [ 2 ];
|
|
|
if (e.data.redMoneyAddition <= 0) console.log("返回奖励为0"); else {
|
|
|
+gData.harvestData.getType = 0;
|
|
|
o = [ {
|
|
|
rewardType: 1,
|
|
|
rewardNum: e.data.redMoneyAddition
|
|
|
@@ -15290,6 +15351,7 @@ return c(this, function() {
|
|
|
mk.audio.playEffect("button");
|
|
|
mk.ui.closePanel("HarvestPanel");
|
|
|
mk.ad.videoAdType = l.VideoAdType.video_init_12;
|
|
|
+gData.harvestData.getType = 1;
|
|
|
mk.ad.watchAd(function(e) {
|
|
|
return r(t, void 0, void 0, function() {
|
|
|
return c(this, function(t) {
|
|
|
@@ -17159,7 +17221,7 @@ cc.sys.localStorage.removeItem(i.StorageKey.nickname);
|
|
|
cc.sys.localStorage.removeItem(i.StorageKey.avatar);
|
|
|
cc.audioEngine.stopAll();
|
|
|
cc.game.restart();
|
|
|
-});
|
|
|
+}, 500);
|
|
|
};
|
|
|
return t;
|
|
|
}();
|
|
|
@@ -17336,19 +17398,10 @@ this.setProgress(0);
|
|
|
};
|
|
|
e.prototype.start = function() {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
-var t;
|
|
|
-return c(this, function(e) {
|
|
|
-switch (e.label) {
|
|
|
-case 0:
|
|
|
+return c(this, function() {
|
|
|
if (1 == mk.storage.getStorage("alifengkong")) return [ 2 ];
|
|
|
mk.aliRiskManager.init();
|
|
|
-t = this;
|
|
|
-return [ 4, mk.loader.load("game/coregame/coregame", cc.Prefab) ];
|
|
|
-
|
|
|
-case 1:
|
|
|
-t.coreGame = e.sent();
|
|
|
return [ 2 ];
|
|
|
-}
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
@@ -17380,17 +17433,16 @@ this.checkShowIdentification();
|
|
|
}
|
|
|
if (!gData.loginData.passAnti) return;
|
|
|
}
|
|
|
-if (!this.loadSceneState) {
|
|
|
-this.loadSceneState = !0;
|
|
|
-this.loadMain();
|
|
|
-}
|
|
|
if (gData.loginData.loadResCompelete) {
|
|
|
if (mk.aliRiskManager.getRiskCode) {
|
|
|
mk.aliRiskManager.getRiskCode = !1;
|
|
|
this.login();
|
|
|
-} else if (gData.gameData.dataFinish && this.coreGame) {
|
|
|
+} else if (gData.gameData.dataFinish) {
|
|
|
if (gData.loginData.isAuth) {
|
|
|
-this.addToScene();
|
|
|
+if (!this.loadSceneState) {
|
|
|
+this.loadSceneState = !0;
|
|
|
+this.loadMain();
|
|
|
+}
|
|
|
console.log("===[Jsbsystem 显示开屏广告================================");
|
|
|
mk.ad.ifShowAd && l.default.showSplash();
|
|
|
} else {
|
|
|
@@ -17420,6 +17472,7 @@ return [ 4, mk.loader.load("game/coregame/coregame", cc.Prefab, this.setProgress
|
|
|
|
|
|
case 1:
|
|
|
t.coreGame = e.sent();
|
|
|
+this.addToScene();
|
|
|
return [ 2 ];
|
|
|
}
|
|
|
});
|
|
|
@@ -17579,7 +17632,7 @@ if (!this.cool) {
|
|
|
this.cool = !0;
|
|
|
this.scheduleOnce(function() {
|
|
|
t.cool = !1;
|
|
|
-}, 2);
|
|
|
+}, 3);
|
|
|
l.default.WxAuth();
|
|
|
}
|
|
|
};
|
|
|
@@ -20476,7 +20529,7 @@ var t;
|
|
|
return c(this, function() {
|
|
|
switch (this.data.state) {
|
|
|
case s.PastureState.Lock:
|
|
|
-2 == (t = gData.gameData.getProductMap(this.data.productID)).unlock ? mk.tip.pop("农场达到" + t.value + "级解锁") : 1 == t.unlock && mk.tip.pop("喂食" + t.name + t.value + "次解锁");
|
|
|
+2 == (t = gData.gameData.getProductMap(this.data.productID)).unlock ? mk.tip.pop("完成" + t.value + "次任务红包后解锁") : 1 == t.unlock && mk.tip.pop("喂食" + t.name + t.value + "次解锁");
|
|
|
break;
|
|
|
|
|
|
case s.PastureState.Empty:
|
|
|
@@ -20538,7 +20591,7 @@ this.data.state = s.PastureState.Empty;
|
|
|
this.data.growSpan = 0;
|
|
|
gData.gameData.setPastureDataMap(this.configID, this.data);
|
|
|
gData.gameData.setNextProduct(!1);
|
|
|
-gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node);
|
|
|
+0 == gData.harvestData.getType ? gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node) : gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_others, this.node);
|
|
|
};
|
|
|
i([ g({
|
|
|
type: cc.Node,
|
|
|
@@ -21301,7 +21354,6 @@ if (this.data.tab == l.ProductType.nzw) {
|
|
|
gData.farmSystem.plant(this.data.picture);
|
|
|
gData.gameData.nextMake = null;
|
|
|
gData.gameData.setNextProduct(!1);
|
|
|
-gData.gameData.playerProp.gradeLevel < 2 && mk.tip.pop("生产次数+1");
|
|
|
} else gData.factorySystem.make(this.data.picture);
|
|
|
gData.gameData.updateNewTaskProgress(!0);
|
|
|
}
|
|
|
@@ -22015,7 +22067,7 @@ e.prototype.onEnable = function() {
|
|
|
this.scheduleOnce(function() {
|
|
|
mk.guide.open(4);
|
|
|
}, .5);
|
|
|
-this.lbl_times.string = "生产次数x" + gData.gameData.configs.ServerConfig.ProductionAd;
|
|
|
+this.lbl_times.string = "生产次数+" + gData.gameData.configs.ServerConfig.ProductionAd;
|
|
|
gData.gameData.init_productTask = !1;
|
|
|
if (gData.gameData.playerProp.userFarmTaskInfo) {
|
|
|
var t = gData.gameData.playerProp.userFarmTaskInfo.completeCount, e = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
|
|
|
@@ -22023,12 +22075,19 @@ if (e > t) {
|
|
|
this.lbl_taskTimes.string = (e - t).toString();
|
|
|
this.node_Uncomplete.active = !0;
|
|
|
this.node_complete.active = !1;
|
|
|
+this.node_Uncomplete.scale = 2;
|
|
|
+cc.tween(this.node_Uncomplete).to(.3, {
|
|
|
+scale: 1
|
|
|
+}).start();
|
|
|
} else {
|
|
|
this.node_Uncomplete.active = !1;
|
|
|
this.node_complete.active = !0;
|
|
|
}
|
|
|
this.lbl_progress.string = t + "/" + e;
|
|
|
-this.sp_taskProgress.fillRange = t / e;
|
|
|
+var o = t / e;
|
|
|
+cc.tween(this.sp_taskProgress).to(.2, {
|
|
|
+fillRange: o
|
|
|
+}).start();
|
|
|
}
|
|
|
};
|
|
|
e.prototype.update = function() {
|
|
|
@@ -23628,10 +23687,7 @@ t.lbl_taskProgress.string = e + "/" + o;
|
|
|
}).start();
|
|
|
this.lbl_taskNum.string = o.toString();
|
|
|
var a = this.openBtn_ani.getComponent(p.default);
|
|
|
-if (a && e < o) {
|
|
|
-a.setGray(!0);
|
|
|
-this.openBtn_ani.getComponent(cc.Button).interactable = !1;
|
|
|
-}
|
|
|
+a && e < o && a.setGray(!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;
|
|
|
@@ -23693,13 +23749,11 @@ 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;
|
|
|
this.delayTime = 0;
|
|
|
this.times = 0;
|
|
|
-mk.ui.closePanel(this.node.name);
|
|
|
gData.cashPro.cashPro_money = e.data.cashMoney;
|
|
|
gData.cashPro.init_success = !0;
|
|
|
mk.data.sendDataEvent(u.DataEventId.Sundry, "任务红包提现成功");
|
|
|
@@ -24825,7 +24879,7 @@ gData.reward.flyCoinAnim(t);
|
|
|
if (gData.reward.callback) {
|
|
|
gData.reward.callback();
|
|
|
gData.reward.callback = null;
|
|
|
-}
|
|
|
+} else gData.farmGradeData.addGradeExp(l.ExpAddType.EAT_others);
|
|
|
this.onClickClose();
|
|
|
};
|
|
|
e.prototype.clickCashOut = function() {
|
|
|
@@ -25471,6 +25525,7 @@ console.log("=== gData.wechatData.unionid", gData.wechatData.unionid);
|
|
|
console.log("=== gData.wechatData.nickName", gData.wechatData.nickName);
|
|
|
this.lbl_id.string = "ID:" + mk.string.getNewLimitStr(gData.wechatData.unionid, 10);
|
|
|
this.lbl_nickname.string = gData.wechatData.nickName;
|
|
|
+this.lbl_version.string = gData.appData.appVersion;
|
|
|
this.lbl_lv.string = "Lv:" + gData.gameData.playerProp.gradeLevel.toString();
|
|
|
this.lbl_redBagCoin.string = (gData.gameData.playerProp.redMoney / 100).toString();
|
|
|
this.lbl_value.string = (gData.gameData.playerProp.redMoney / 1e6).toFixed(3) + "元";
|