|
|
@@ -8146,7 +8146,7 @@ break;
|
|
|
|
|
|
case s.FactroyState.Ripe:
|
|
|
gData.factorySystem.currSelectFactory = this;
|
|
|
-gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this));
|
|
|
+gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node);
|
|
|
break;
|
|
|
|
|
|
case s.FactroyState.Sick:
|
|
|
@@ -8216,7 +8216,7 @@ gData.gameData.setNextProduct(!1);
|
|
|
e.prototype.canHarvest = function() {
|
|
|
this.getComponent(l.MoveToCenter).move();
|
|
|
gData.factorySystem.currSelectFactory = this;
|
|
|
-gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this));
|
|
|
+gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node);
|
|
|
};
|
|
|
e.prototype.canClearSick = function() {
|
|
|
this.getComponent(l.MoveToCenter).move();
|
|
|
@@ -9314,7 +9314,7 @@ break;
|
|
|
|
|
|
case s.FarmState.Ripe:
|
|
|
gData.farmSystem.currSelectFarm = this;
|
|
|
-gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this));
|
|
|
+gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this), this.node);
|
|
|
break;
|
|
|
|
|
|
case s.FarmState.Sick:
|
|
|
@@ -9411,7 +9411,7 @@ this.process.cleanProcess();
|
|
|
};
|
|
|
e.prototype.canHarvest = function() {
|
|
|
gData.farmSystem.currSelectFarm = this;
|
|
|
-gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this));
|
|
|
+gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this), this.node);
|
|
|
};
|
|
|
e.prototype.canClearSick = function() {
|
|
|
gData.farmSystem.currSelectFarm = this;
|
|
|
@@ -12056,7 +12056,14 @@ for (var t = gData.gameData.funOpenData, e = 0; e < t.length; e++) {
|
|
|
var o = this["btn" + (e + 1)];
|
|
|
o && (o.active = "1" == t[e]);
|
|
|
}
|
|
|
-this.btn8.active && (this.btn8.active = gData.gameData.playerProp.completeFarmTaskTimes >= parseInt(gData.gameData.configs.ServerConfig.FlyRedMoney));
|
|
|
+if (this.btn8.active) {
|
|
|
+var n = gData.gameData.playerProp.completeFarmTaskTimes >= parseInt(gData.gameData.configs.ServerConfig.FlyRedMoney);
|
|
|
+this.btn8.active = n;
|
|
|
+n || mk.event.register("refreshBubble", this.refreshStatus.bind(this), this);
|
|
|
+}
|
|
|
+};
|
|
|
+e.prototype.refreshStatus = function() {
|
|
|
+this.btn8.active = gData.gameData.playerProp.completeFarmTaskTimes >= parseInt(gData.gameData.configs.ServerConfig.FlyRedMoney);
|
|
|
};
|
|
|
i([ s({
|
|
|
type: cc.Node,
|
|
|
@@ -12861,8 +12868,7 @@ gData.gameData.init_task = !0;
|
|
|
this.playerProp.userFarmTaskInfo = n.data.userFarmTaskInfo;
|
|
|
if (this.playerProp.userFarmTaskInfo.completeCount >= this.playerProp.userFarmTaskInfo.taskCount) {
|
|
|
mk.ui.closeAllUI();
|
|
|
-mk.guide.curDes = "";
|
|
|
-mk.guide.open(3);
|
|
|
+mk.guide.open(4);
|
|
|
}
|
|
|
return [ 2, !0 ];
|
|
|
}
|
|
|
@@ -13955,7 +13961,7 @@ scale: 1
|
|
|
this.lbl_redMoney.string = gData.gameData.playerProp.redMoney / 100 + "";
|
|
|
gData.gameData.init_coin = !1;
|
|
|
if (gData.gameData.addHb > 0) {
|
|
|
-var e = gData.gameData.addHb / 100;
|
|
|
+var e = Math.round(gData.gameData.addHb / 100);
|
|
|
this.lbl_addHb.string = "+" + e.toString();
|
|
|
gData.gameData.addHb = 0;
|
|
|
cc.Tween.stopAllByTarget(this.node_addHb);
|
|
|
@@ -13963,7 +13969,7 @@ this.node_addHb.active = !0;
|
|
|
this.node_addHb.scale = 0;
|
|
|
cc.tween(this.node_addHb).to(.1, {
|
|
|
scale: 1
|
|
|
-}).delay(1).call(function() {
|
|
|
+}).delay(1.5).call(function() {
|
|
|
t.node_addHb.active = !1;
|
|
|
}).start();
|
|
|
}
|
|
|
@@ -14219,7 +14225,7 @@ this.node_addExp.scale = 0;
|
|
|
this.lbl_addExp.string = "+" + t;
|
|
|
cc.tween(this.node_addExp).to(.1, {
|
|
|
scale: 1
|
|
|
-}).delay(1).call(function() {
|
|
|
+}).delay(1.5).call(function() {
|
|
|
o.node_addExp.active = !1;
|
|
|
}).start();
|
|
|
} else {
|
|
|
@@ -15306,8 +15312,10 @@ var n = t("../../game/data/GameData"), a = t("./UISystem"), i = function() {
|
|
|
function t() {
|
|
|
this.curDes = "";
|
|
|
}
|
|
|
-t.prototype.open = function(t) {
|
|
|
+t.prototype.open = function(t, e) {
|
|
|
+void 0 === e && (e = "");
|
|
|
if ("0" != gData.gameData.configs.ServerConfig.NewUserGuide) {
|
|
|
+this.curDes = e;
|
|
|
this.crtGuideID = gData.gameData.getProp(n.GameProp.guideID);
|
|
|
null == this.crtGuideID && (this.crtGuideID = 0);
|
|
|
if (this.crtGuideID >= 9999) mk.console.log("新手引导已做完"); else if (t <= this.crtGuideID && this.crtGuideID > 0) mk.console.log("当前引导已做过:" + t); else {
|
|
|
@@ -15319,7 +15327,7 @@ this.setGuideID(this.crtGuideID++);
|
|
|
}
|
|
|
};
|
|
|
t.prototype.setGuideID = function(t) {
|
|
|
-if (5 == t) {
|
|
|
+if (4 == t) {
|
|
|
t = 9999;
|
|
|
mk.data.sendXYEvent("guide_end", "新手引导结束");
|
|
|
}
|
|
|
@@ -15664,10 +15672,6 @@ this.nextStep();
|
|
|
e.prototype.nextStep = function() {
|
|
|
this.crtStep++;
|
|
|
this.crtGuide = this.guides[this.crtStep];
|
|
|
-if (2 == gData.guideData.crtID && 1 == this.crtStep) {
|
|
|
-var t = gData.gameData.playerProp.userFarmTaskInfo.completeCount, e = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
|
|
|
-mk.guide.curDes = "<color=8A4312>继续生产,还有<color=ff0000>" + (e - t) + "次</color>即可\n提现<color=ff0000>!</color></color>";
|
|
|
-}
|
|
|
mk.data.sendDataEvent(s.DataEventId.guide, "新手引导第" + gData.guideData.crtID + "_" + this.crtStep + "步完成");
|
|
|
this.updateGuide();
|
|
|
};
|
|
|
@@ -15945,13 +15949,14 @@ e.config = null;
|
|
|
e.call = null;
|
|
|
e.getType = 0;
|
|
|
e.init_reward = !1;
|
|
|
-e.worldPos = null;
|
|
|
+e.node_fly = null;
|
|
|
return e;
|
|
|
}
|
|
|
-e.prototype.openPanel = function(t, e, o) {
|
|
|
+e.prototype.openPanel = function(t, e, o, n) {
|
|
|
this.configID = t;
|
|
|
this.plantID = e;
|
|
|
this.call = o;
|
|
|
+this.node_fly = n;
|
|
|
this.config = gData.gameData.getProductMap(this.plantID);
|
|
|
mk.ui.openPanel("game/prefab/uiPanel/HarvestPanel");
|
|
|
};
|
|
|
@@ -15960,7 +15965,8 @@ mk.console.logSingle("HarvestData addata ", this.adData);
|
|
|
t.prototype.setAdData.call(this, e);
|
|
|
gData.reward.data = gData.harvestData.adData.videoRedMoney.videoRewardList;
|
|
|
gData.reward.callback = gData.harvestData.call;
|
|
|
-gData.reward.getReward(this.worldPos);
|
|
|
+var o = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
|
|
|
+gData.reward.getReward(o);
|
|
|
gData.harvestData.call = null;
|
|
|
};
|
|
|
return i([ c ], e);
|
|
|
@@ -16144,7 +16150,7 @@ rewardNum: e.data.redMoneyAddition
|
|
|
} ];
|
|
|
gData.reward.data = o;
|
|
|
gData.reward.callback = gData.harvestData.call;
|
|
|
-n = this.node_hb.parent.convertToWorldSpaceAR(this.node_hb.getPosition());
|
|
|
+n = gData.harvestData.node_fly.parent.convertToWorldSpaceAR(gData.harvestData.node_fly.getPosition());
|
|
|
gData.reward.getReward(n);
|
|
|
}
|
|
|
mk.ui.closePanel("HarvestPanel");
|
|
|
@@ -16158,7 +16164,6 @@ return r(this, void 0, void 0, function() {
|
|
|
var t = this;
|
|
|
return c(this, function() {
|
|
|
mk.audio.playEffect("button");
|
|
|
-gData.harvestData.worldPos = this.node_hb.parent.convertToWorldSpaceAR(this.node_hb.getPosition());
|
|
|
mk.ui.closePanel("HarvestPanel");
|
|
|
mk.ad.videoAdType = l.VideoAdType.video_init_12;
|
|
|
gData.harvestData.getType = 1;
|
|
|
@@ -21532,7 +21537,7 @@ mk.ui.openPanel("module/speedUpUI/speedUp");
|
|
|
break;
|
|
|
|
|
|
case s.PastureState.Ripe:
|
|
|
-gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this));
|
|
|
+gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node);
|
|
|
break;
|
|
|
|
|
|
case s.PastureState.Sick:
|
|
|
@@ -21634,7 +21639,7 @@ gData.gameData.setNextProduct(!1);
|
|
|
};
|
|
|
e.prototype.canHarvest = function() {
|
|
|
this.getComponent(l.MoveToCenter).move();
|
|
|
-gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this));
|
|
|
+gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node);
|
|
|
};
|
|
|
e.prototype.canClearSick = function() {
|
|
|
this.getComponent(l.MoveToCenter).move();
|
|
|
@@ -22920,8 +22925,8 @@ this.node_Uncomplete.active = !0;
|
|
|
this.node_complete.active = !1;
|
|
|
e = !0;
|
|
|
this.scheduleOnce(function() {
|
|
|
-mk.guide.curDes = "<color=8A4312>再<color=ff0000>生产" + (n - o) + "次</color>,即可<color=ff0000>提现</color>,\n快领取次数吧!</color>";
|
|
|
-mk.guide.open(2);
|
|
|
+var t = "<color=8A4312>再<color=ff0000>生产" + (n - o) + "次</color>,即可<color=ff0000>提现</color>,\n快领取次数吧!</color>";
|
|
|
+mk.guide.open(2, t);
|
|
|
}, .5);
|
|
|
} else {
|
|
|
this.node_Uncomplete.active = !1;
|
|
|
@@ -24132,6 +24137,7 @@ mk.console.logSingle("redBagTask=>", e);
|
|
|
if (0 != e.errcode) return [ 2, null ];
|
|
|
gData.gameData.playerProp.userFarmTaskInfo = e.data.userFarmTaskInfo;
|
|
|
gData.gameData.playerProp.completeFarmTaskTimes = e.data.completeFarmTaskTimes;
|
|
|
+mk.event.emit("refreshBubble");
|
|
|
mk.data.setTAEventUser(0, "Cumulative_task", gData.gameData.playerProp.completeFarmTaskTimes);
|
|
|
gData.gameData.checkTaskFinishUnLock();
|
|
|
gData.gameData.init_task = !0;
|
|
|
@@ -24727,9 +24733,9 @@ gData.reward.adData = null;
|
|
|
};
|
|
|
e.prototype.watchVideoCall = function() {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
-var t, e, o, n, a;
|
|
|
-return c(this, function(i) {
|
|
|
-switch (i.label) {
|
|
|
+var t, e, o, n, a, i, r, p;
|
|
|
+return c(this, function(c) {
|
|
|
+switch (c.label) {
|
|
|
case 0:
|
|
|
gData.reward.adData && (gData.reward.data = gData.reward.adData.videoRedMoney.videoRewardList);
|
|
|
if (!gData.reward.data || !gData.reward.data.length) return [ 2 ];
|
|
|
@@ -24743,14 +24749,20 @@ n = this.node_hb;
|
|
|
return [ 4, mk.loader.load("game/texture/coin/" + gData.reward.data[0].rewardType, cc.SpriteFrame) ];
|
|
|
|
|
|
case 1:
|
|
|
-n.spriteFrame = i.sent();
|
|
|
+n.spriteFrame = c.sent();
|
|
|
gData.reward.data[0].rewardType === l.RewardType.productTimes ? this.node_hb.node.scale = .5 : this.node_hb.node.scale = 1;
|
|
|
a = gData.reward.data[0].rewardNum || 0;
|
|
|
if (gData.reward.data[0].rewardType === l.RewardType.pigRmb) ; else {
|
|
|
if (gData.reward.data[0].rewardType != l.RewardType.productTimes) {
|
|
|
a = Math.round(a / 100);
|
|
|
this.lbl_des.string = "红包币";
|
|
|
-} else this.lbl_des.string = "生产次数";
|
|
|
+} else {
|
|
|
+i = gData.gameData.playerProp.userFarmTaskInfo.completeCount;
|
|
|
+r = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
|
|
|
+p = "<color=8A4312>继续生产,还有<color=ff0000>" + (r - i) + "次</color>即可\n提现<color=ff0000>!</color></color>";
|
|
|
+mk.guide.open(3, p);
|
|
|
+this.lbl_des.string = "生产次数";
|
|
|
+}
|
|
|
this.lbl_reward_num.string = "+" + a;
|
|
|
}
|
|
|
gData.reward.data[0].rewardType === l.RewardType.redBag && (gData.reward.add_redbag_value = gData.reward.data[0].rewardNum);
|