|
|
@@ -7469,9 +7469,9 @@ break;
|
|
|
|
|
|
case r.bottomIn:
|
|
|
var s = -cc.winSize.height;
|
|
|
-cc.tween(this.effect_par).to(.3, {
|
|
|
+cc.tween(this.effect_par).to(.4, {
|
|
|
y: s
|
|
|
-}, cc.easeOut(3)).call(function() {
|
|
|
+}, cc.easeSineOut()).call(function() {
|
|
|
t && t();
|
|
|
}).start();
|
|
|
}
|
|
|
@@ -8611,14 +8611,16 @@ this.factoryIcons.push(t);
|
|
|
};
|
|
|
t.prototype.nextFactory = function(t) {
|
|
|
var e = gData.gameData.playerProp.orderData, a = gData.gameData.playerProp.copyOrderData;
|
|
|
-if (e && e.orderTaskList) {
|
|
|
-if (1 == t.state) for (var o = e.orderTaskList, n = gData.gameData.configs.Product, i = 0; i != o.length; ++i) {
|
|
|
+if (!e || !e.orderTaskList) return this.doSameCheckLogic(t);
|
|
|
+if (1 != t.state) return this.doSameCheckLogic(t);
|
|
|
+for (var o = e.orderTaskList, n = gData.gameData.configs.Product, i = 0; i != o.length; ++i) {
|
|
|
var c = o[i];
|
|
|
if (a[i] < c.taskCount && c.Id <= n.length) for (var s = n[c.Id - 1], l = this.factoryIcons.length, p = 0; p < l; p++) {
|
|
|
var u = gData.gameData.getTabByConfigID(this.factoryIcons[p].configID), d = gData.gameData.getMaxProduct(u);
|
|
|
if (u == s.tab && this.factoryIcons[p].data.state == r.FactroyState.Empty && s.picture <= d) {
|
|
|
gData.gameData.nextCanProduct = gData.gameData.getProductMap(s.picture);
|
|
|
gData.gameData.nextMake = this.factoryIcons[h];
|
|
|
+gData.gameData.nextType = 3;
|
|
|
return this.factoryIcons[h];
|
|
|
}
|
|
|
} else {
|
|
|
@@ -8626,18 +8628,32 @@ l = this.factoryIcons.length;
|
|
|
for (var h = 0; h < l; h++) if (this.factoryIcons[h].data.state == r.FactroyState.Empty) {
|
|
|
gData.gameData.nextCanProduct = gData.gameData.getRandomFactoryConfig(this.factoryIcons[h].configID);
|
|
|
gData.gameData.nextMake = this.factoryIcons[h];
|
|
|
+gData.gameData.nextType = 3;
|
|
|
return this.factoryIcons[h];
|
|
|
}
|
|
|
}
|
|
|
-} else for (l = this.factoryIcons.length, h = 0; h < l; h++) if (this.factoryIcons[h].data.state == r.FactroyState.Empty) {
|
|
|
-gData.gameData.nextCanProduct = gData.gameData.getRandomFactoryConfig(this.factoryIcons[h].configID);
|
|
|
-gData.gameData.nextMake = this.factoryIcons[h];
|
|
|
-return this.factoryIcons[h];
|
|
|
}
|
|
|
-} else for (l = this.factoryIcons.length, h = 0; h < l; h++) if (this.factoryIcons[h].data.state == r.FactroyState.Empty) {
|
|
|
-gData.gameData.nextCanProduct = gData.gameData.getRandomFactoryConfig(this.factoryIcons[h].configID);
|
|
|
-gData.gameData.nextMake = this.factoryIcons[h];
|
|
|
-return this.factoryIcons[h];
|
|
|
+return null;
|
|
|
+};
|
|
|
+t.prototype.doSameCheckLogic = function(t) {
|
|
|
+if (0 == t.state) {
|
|
|
+for (var e = this.factoryIcons.length, a = 0; a < e; a++) if (this.factoryIcons[a].data.state == r.FactroyState.Empty) {
|
|
|
+gData.gameData.nextCanProduct = gData.gameData.getRandomFactoryConfig(this.factoryIcons[a].configID);
|
|
|
+gData.gameData.nextMake = this.factoryIcons[a];
|
|
|
+gData.gameData.nextType = 3;
|
|
|
+return this.factoryIcons[a];
|
|
|
+}
|
|
|
+} else {
|
|
|
+var o = gData.gameData.doFarmMapDataCheck(2, {
|
|
|
+state: !1
|
|
|
+});
|
|
|
+if (o) return o;
|
|
|
+for (e = this.factoryIcons.length, a = 0; a < e; a++) if (this.factoryIcons[a].data.state == r.FactroyState.Empty) {
|
|
|
+gData.gameData.nextCanProduct = gData.gameData.getRandomFactoryConfig(this.factoryIcons[a].configID);
|
|
|
+gData.gameData.nextMake = this.factoryIcons[a];
|
|
|
+gData.gameData.nextType = 3;
|
|
|
+return this.factoryIcons[a];
|
|
|
+}
|
|
|
}
|
|
|
return null;
|
|
|
};
|
|
|
@@ -10507,6 +10523,7 @@ return a;
|
|
|
};
|
|
|
t.prototype.getCanPlantFarm = function(t) {
|
|
|
for (var e = this.farms.length, a = 0; a < e; a++) if (this.farms[a] != this.currSelectFarm && this.farms[a].data.state == r.FarmState.Empty) {
|
|
|
+t.state = 0;
|
|
|
var o = gData.gameData.getRandomPlantConfig(t);
|
|
|
if (o) {
|
|
|
gData.gameData.nextCanProduct = o;
|
|
|
@@ -11586,16 +11603,21 @@ n && n();
|
|
|
s.destroy();
|
|
|
}).start();
|
|
|
};
|
|
|
-e.prototype.playFlyAniExtra = function(t, e, a, o, n) {
|
|
|
-void 0 === n && (n = null);
|
|
|
-var i = t.parent.convertToWorldSpaceAR(t.getPosition()), r = this.node.convertToNodeSpaceAR(i), c = e.parent.convertToWorldSpaceAR(e.getPosition()), s = this.node.convertToNodeSpaceAR(c);
|
|
|
+e.prototype.playFlyAniExtra = function(t, e, a, o, n, i) {
|
|
|
+void 0 === n && (n = 0);
|
|
|
+void 0 === i && (i = null);
|
|
|
+var r = t.parent.convertToWorldSpaceAR(t.getPosition()), c = this.node.convertToNodeSpaceAR(r), s = e.parent.convertToWorldSpaceAR(e.getPosition()), l = this.node.convertToNodeSpaceAR(s);
|
|
|
if (a) {
|
|
|
+var p = cc.v2(mk.math.random(-1, 1, !1), mk.math.random(-1, 1, !1));
|
|
|
+p = p.normalize();
|
|
|
+cc.v2(mk.math.random(10, 160, !1) * p.x, mk.math.random(10, 160, !1) * p.y);
|
|
|
+c.add(p);
|
|
|
a.setParent(this.node);
|
|
|
-a.setPosition(r);
|
|
|
-cc.tween(a).to(o, {
|
|
|
-position: cc.v3(s)
|
|
|
+a.setPosition(c);
|
|
|
+cc.tween(a).delay(n).to(o, {
|
|
|
+position: cc.v3(l)
|
|
|
}, cc.easeSineOut()).call(function() {
|
|
|
-n && n();
|
|
|
+i && i();
|
|
|
a.destroy();
|
|
|
}).start();
|
|
|
}
|
|
|
@@ -12373,7 +12395,7 @@ Object.defineProperty(a, "__esModule", {
|
|
|
value: !0
|
|
|
});
|
|
|
a.Fun = void 0;
|
|
|
-var o, n = t("./AppData"), i = t("./GameData"), r = t("./HttpData"), c = t("./LoginData"), s = t("./StorageData"), l = t("./WechatData"), p = t("./module/HelpData"), u = t("./module/TurnableData"), d = t("./module/SignData"), h = t("./module/FissionData"), f = t("./AdData"), y = t("./module/RewardData"), g = t("./module/CashNormalData"), m = t("./module/ReceiptNoticeData"), _ = t("./module/BlessingBagData"), v = t("./module/CashProData"), b = t("./module/RedBagCashData"), D = t("./module/RedCodeData"), w = t("./module/MoreGameData"), S = t("./module/SettingData"), A = t("./module/GuideData"), k = t("./module/GuideWeakData"), P = t("./ConfigData"), O = t("./module/NewCashUIData"), I = t("../../before/view/data/ADUnlockData"), T = t("../../before/view/data/PlantData"), R = t("../../before/main/FarmSystem"), C = t("../../before/view/data/HarvestData"), F = t("../../before/view/data/ADClearSickData"), x = t("../../before/main/PastureSystem"), N = t("../../before/main/FactorySystem"), M = t("./module/FarmMapData"), j = t("./module/GradeRewardData"), E = t("./module/WalletCashOutData"), L = t("./module/LineUpUIData"), B = t("./module/WarnTipData"), U = function() {
|
|
|
+var o, n = t("./AppData"), i = t("./GameData"), r = t("./HttpData"), c = t("./LoginData"), s = t("./StorageData"), l = t("./WechatData"), p = t("./module/HelpData"), u = t("./module/TurnableData"), d = t("./module/SignData"), h = t("./module/FissionData"), f = t("./AdData"), y = t("./module/RewardData"), g = t("./module/CashNormalData"), m = t("./module/ReceiptNoticeData"), _ = t("./module/BlessingBagData"), v = t("./module/CashProData"), b = t("./module/RedBagCashData"), D = t("./module/RedCodeData"), w = t("./module/MoreGameData"), S = t("./module/SettingData"), A = t("./module/GuideData"), k = t("./module/GuideWeakData"), P = t("./ConfigData"), O = t("./module/NewCashUIData"), I = t("../../before/view/data/ADUnlockData"), T = t("../../before/view/data/PlantData"), R = t("../../before/main/FarmSystem"), C = t("../../before/view/data/HarvestData"), F = t("../../before/view/data/ADClearSickData"), x = t("../../before/main/PastureSystem"), M = t("../../before/main/FactorySystem"), N = t("./module/FarmMapData"), j = t("./module/GradeRewardData"), E = t("./module/WalletCashOutData"), L = t("./module/LineUpUIData"), B = t("./module/WarnTipData"), U = function() {
|
|
|
function t() {
|
|
|
this.init();
|
|
|
}
|
|
|
@@ -12407,9 +12429,9 @@ this.plantData = new T.default();
|
|
|
this.harvestData = new C.default();
|
|
|
this.adClearSickData = new F.default();
|
|
|
this.pastureSystem = new x.default();
|
|
|
-this.factorySystem = new N.default();
|
|
|
+this.factorySystem = new M.default();
|
|
|
this.farmSystem = new R.FarmSystem();
|
|
|
-this.farmMapData = new M.FarmMapData();
|
|
|
+this.farmMapData = new N.FarmMapData();
|
|
|
this.farmGradeData = new j.GradeRewardData();
|
|
|
this.walletCashOutData = new E.WalletCashOutData();
|
|
|
this.lineUpUIData = new L.LineUpUIData();
|
|
|
@@ -12866,7 +12888,7 @@ this.playerProp.redMoneyCashPayRecordList = t.redMoneyCashPayRecordList;
|
|
|
mk.console.logSingle("userNoviceWeFareInfo==>", t.userNoviceWeFareInfo);
|
|
|
this.playerProp.userFarmTaskInfo = t.userFarmTaskInfo;
|
|
|
this.playerProp.speedUpLeftTimes = t.speedUpLeftTimes;
|
|
|
-this.playerProp.completeFarmTaskTimes = t.completeFarmTaskTimes;
|
|
|
+this.playerProp.completeFarmTaskTimes = 3;
|
|
|
this.playerProp.orderData = t.userOrderTaskInfo;
|
|
|
console.log("==============initPlayerProp");
|
|
|
console.log(t.userOrderTaskInfo);
|
|
|
@@ -13070,10 +13092,11 @@ o = !0;
|
|
|
var m = f[g.Id - 1];
|
|
|
if (m.tab == u.nzw) {
|
|
|
var _ = this.getMaxProduct(u.nzw);
|
|
|
-if (m.picture <= _) {
|
|
|
+if (_ && m.picture <= _) {
|
|
|
e = m.picture;
|
|
|
a = !1;
|
|
|
i = !0;
|
|
|
+this.nextType = 1;
|
|
|
mk.console.logSingle("getRandomPlantConfig=>", e);
|
|
|
break;
|
|
|
}
|
|
|
@@ -13081,32 +13104,39 @@ break;
|
|
|
}
|
|
|
}
|
|
|
if (!i) {
|
|
|
+if (v = this.doFarmMapDataCheck(0)) e = v; else {
|
|
|
e = r.default.rnd(10001, this.getMaxProduct(u.nzw));
|
|
|
+this.nextType = 1;
|
|
|
+}
|
|
|
console.log("订单数据没有匹配成功");
|
|
|
}
|
|
|
} else {
|
|
|
n = !0;
|
|
|
+var v;
|
|
|
+if (v = this.doFarmMapDataCheck(0)) e = v; else {
|
|
|
e = r.default.rnd(10001, this.getMaxProduct(u.nzw));
|
|
|
+this.nextType = 1;
|
|
|
+}
|
|
|
console.log("订单数据为null");
|
|
|
}
|
|
|
if (n) return this.getProductMap(e);
|
|
|
if (a) {
|
|
|
if (o) {
|
|
|
-var v = !1;
|
|
|
-for (y = 0; y != c.length; ++y) for (var b = gData.factorySystem.factoryIcons, D = b.length, w = 0; w < D; w++) if (this.getTabByConfigID(b[w].configID) == c[w] && b[w].data.state == d.Empty) {
|
|
|
-v = !0;
|
|
|
+var b = !1;
|
|
|
+for (y = 0; y != c.length; ++y) for (var D = gData.factorySystem.factoryIcons, w = D.length, S = 0; S < w; S++) if (this.getTabByConfigID(D[S].configID) == c[S] && D[S].data.state == d.Empty) {
|
|
|
+b = !0;
|
|
|
t.state = 1;
|
|
|
break;
|
|
|
}
|
|
|
-if (!v) for (y = 0; y != s.length; ++y) {
|
|
|
-var S = gData.pastureSystem.pastureIcons;
|
|
|
-for (D = S.length, w = 0; w < D; w++) if (S[w].data.productID == s[y] && S[w].data.state == p.Empty) {
|
|
|
-v = !0;
|
|
|
+if (!b) for (y = 0; y != s.length; ++y) {
|
|
|
+var A = gData.pastureSystem.pastureIcons;
|
|
|
+for (w = A.length, S = 0; S < w; S++) if (A[S].data.productID == s[y] && A[S].data.state == p.Empty) {
|
|
|
+b = !0;
|
|
|
t.state = 2;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-return v ? null : this.getProductMap(e);
|
|
|
+return b ? null : this.getProductMap(e);
|
|
|
}
|
|
|
return this.getProductMap(e);
|
|
|
}
|
|
|
@@ -13120,16 +13150,59 @@ if (a[c].picture == o) break;
|
|
|
var s = n[r.default.rnd(0, n.length - 1)];
|
|
|
return this.getProductMap(s);
|
|
|
};
|
|
|
+t.prototype.doFarmMapDataCheck = function(t, e) {
|
|
|
+var a = 0;
|
|
|
+for (var o in u) {
|
|
|
+if (t <= a) {
|
|
|
+var n = this.getMaxProduct(u[o]);
|
|
|
+if (n) for (var i = this.getProductArrByType(u[o]), r = 0; r != i.length; ++r) {
|
|
|
+var c = i[r].picture - 1;
|
|
|
+if (1 == i[r].unlock && c == n && 0 == this.getFarmMapRewardState(this.getIndex(i[r]))) switch (u[o]) {
|
|
|
+case u.nzw:
|
|
|
+console.log("图鉴数据匹配成功");
|
|
|
+this.nextType = 1;
|
|
|
+return c;
|
|
|
+
|
|
|
+case u.dw:
|
|
|
+for (var s = gData.pastureSystem.pastureIcons, l = s.length, h = 0; h < l; h++) if (s[h].data.state == p.Empty) {
|
|
|
+e && t == a && (e.state = !0);
|
|
|
+if (c == s[h].data.productID) {
|
|
|
+console.log("图鉴数据匹配成功");
|
|
|
+this.nextCanProduct = this.getProductMap(s[h].data.productID);
|
|
|
+this.nextMake = s[h];
|
|
|
+this.nextType = 2;
|
|
|
+return c;
|
|
|
+}
|
|
|
+}
|
|
|
+break;
|
|
|
+
|
|
|
+default:
|
|
|
+var f = gData.factorySystem.factoryIcons;
|
|
|
+for (l = f.length, h = 0; h < l; h++) if (f[h].data.state == d.Empty) {
|
|
|
+e && (e.state = !0);
|
|
|
+if (this.getTabByConfigID(f[h].configID) == u[o]) {
|
|
|
+console.log("图鉴数据匹配成功");
|
|
|
+this.nextCanProduct = this.getProductMap(c);
|
|
|
+this.nextMake = f[h];
|
|
|
+this.nextType = 3;
|
|
|
+return c;
|
|
|
+}
|
|
|
+}
|
|
|
+}
|
|
|
+}
|
|
|
+}
|
|
|
+++a;
|
|
|
+}
|
|
|
+console.log("图鉴数据匹配不成功");
|
|
|
+return null;
|
|
|
+};
|
|
|
t.prototype.setNextProduct = function(t) {
|
|
|
void 0 === t && (t = !0);
|
|
|
if (!this.nextMake) {
|
|
|
var e = {
|
|
|
state: -1
|
|
|
};
|
|
|
-if (gData.farmSystem.selectNextFarm(e, t)) this.nextType = 1; else if (gData.pastureSystem.nextPasture(e)) this.nextType = 2; else {
|
|
|
-var a = gData.factorySystem.nextFactory(e);
|
|
|
-this.nextType = a ? 3 : 0;
|
|
|
-}
|
|
|
+gData.farmSystem.selectNextFarm(e, t) || gData.pastureSystem.nextPasture(e) || gData.factorySystem.nextFactory(e) || (this.nextType = 0);
|
|
|
this.init_makeInfo = !0;
|
|
|
}
|
|
|
};
|
|
|
@@ -13210,7 +13283,7 @@ if (this.playerProp.userFarmTaskInfo) {
|
|
|
t = this.playerProp.userFarmTaskInfo.completeCount;
|
|
|
e = this.playerProp.userFarmTaskInfo.taskCount;
|
|
|
if (t >= e) {
|
|
|
-mk.tip.pop("任务红包进度已满,快去提现");
|
|
|
+this.gameStyle.getIsCanGetOrderReward() || mk.tip.pop("任务红包进度已满,快去提现");
|
|
|
return [ 2, !1 ];
|
|
|
}
|
|
|
}
|
|
|
@@ -13502,6 +13575,53 @@ e = 30009;
|
|
|
}
|
|
|
return e;
|
|
|
};
|
|
|
+t.prototype.getIndex = function(t) {
|
|
|
+var e = {
|
|
|
+i: 0,
|
|
|
+j: 0
|
|
|
+};
|
|
|
+switch (t.tab) {
|
|
|
+case "农作物":
|
|
|
+e.i = 0;
|
|
|
+e.j = t.picture - 10001;
|
|
|
+break;
|
|
|
+
|
|
|
+case "动物":
|
|
|
+e.i = 1;
|
|
|
+e.j = t.picture - 20001;
|
|
|
+break;
|
|
|
+
|
|
|
+case "爆米花厂":
|
|
|
+e.i = 2;
|
|
|
+e.j = t.picture - 20004;
|
|
|
+break;
|
|
|
+
|
|
|
+case "糕点铺":
|
|
|
+e.i = 3;
|
|
|
+e.j = t.picture - 20013;
|
|
|
+break;
|
|
|
+
|
|
|
+case "制糖厂":
|
|
|
+e.i = 4;
|
|
|
+e.j = t.picture - 20010;
|
|
|
+break;
|
|
|
+
|
|
|
+case "炼乳厂":
|
|
|
+e.i = 5;
|
|
|
+e.j = t.picture - 20007;
|
|
|
+break;
|
|
|
+
|
|
|
+case "功夫面馆":
|
|
|
+e.i = 6;
|
|
|
+e.j = t.picture - 20025;
|
|
|
+break;
|
|
|
+
|
|
|
+case "快餐店":
|
|
|
+e.i = 7;
|
|
|
+e.j = t.picture - 20019;
|
|
|
+}
|
|
|
+return e;
|
|
|
+};
|
|
|
t.prototype.freshSendToServer = function(t) {
|
|
|
switch (t) {
|
|
|
case 1:
|
|
|
@@ -14276,6 +14396,7 @@ e.lbl_progress = [];
|
|
|
e.sp_mark = [];
|
|
|
e.lbl_redMoneyValue = [];
|
|
|
e.node_getOrderReward = null;
|
|
|
+e.node_orderHand = null;
|
|
|
e.posY = 0;
|
|
|
e.lastTimeSpan = 0;
|
|
|
e.span = 0;
|
|
|
@@ -14671,9 +14792,21 @@ a.ani_add2.y = a.posY;
|
|
|
e.prototype.initRefreshEvent = function() {
|
|
|
mk.event.register("initFarmMapUi", this.initFarmMapUi.bind(this), this);
|
|
|
mk.event.register("refreshFarmMapUI", this.refreshFarmMapUI.bind(this), this);
|
|
|
+mk.event.register("moveUpAndDownFarmMapUI", this.moveUpAndDownFarmMapUI.bind(this), this);
|
|
|
this.initFarmMapUi();
|
|
|
this.showChangePart();
|
|
|
};
|
|
|
+e.prototype.moveUpAndDownFarmMapUI = function(t) {
|
|
|
+cc.Tween.stopAllByTarget(this.node_farmMapUI);
|
|
|
+t ? cc.tween(this.node_farmMapUI).to(.2, {
|
|
|
+y: 540
|
|
|
+}).start() : cc.tween(this.node_farmMapUI).to(.2, {
|
|
|
+y: 240
|
|
|
+}).start();
|
|
|
+};
|
|
|
+e.prototype.clickFarmMapUIBtn = function() {
|
|
|
+gData.plantData.openPanel(this.productType, 1, this.productIndex - 1);
|
|
|
+};
|
|
|
e.prototype.initFarmMapUi = function() {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
var t, e, a, o, n, i, r, s;
|
|
|
@@ -14691,7 +14824,7 @@ this.node_farmMapProduct.active = !1;
|
|
|
this.node_farmMapUI.active = !0;
|
|
|
return [ 2 ];
|
|
|
}
|
|
|
-} else if (n.picture - 1 == e) {
|
|
|
+} else if (n.picture - 1 == e && 1 == n.unlock) {
|
|
|
this.uiShowType = 2;
|
|
|
this.productType = d.ProductType[t];
|
|
|
this.productIndex = o;
|
|
|
@@ -14701,7 +14834,7 @@ this.node_farmMapUI.active = !0;
|
|
|
i = gData.gameData.getProductMakeTimesById(n.picture - 1);
|
|
|
r = gData.gameData.getProductMap(n.picture - 1).name;
|
|
|
s = this.getDesByType(n);
|
|
|
-this.lbl_farmMapDes.string = "" + s + n.value + "次" + r + "(" + i + "/" + n.value + ")";
|
|
|
+this.lbl_farmMapDes.string = "<color=#7E411F>" + s + "<color=#FF0000>" + n.value + "</c>次" + r + " <color=#FF0000>" + i + "</c>/" + n.value + "</color>";
|
|
|
return [ 2 ];
|
|
|
}
|
|
|
}
|
|
|
@@ -14713,7 +14846,7 @@ return [ 2 ];
|
|
|
e.prototype.refreshFarmMapUI = function() {
|
|
|
if (2 == this.uiShowType) {
|
|
|
var t = gData.gameData.getProductArrByType(this.productType)[this.productIndex], e = gData.gameData.getProductMakeTimesById(t.picture - 1), a = gData.gameData.getProductMap(t.picture - 1).name, o = this.getDesByType(t);
|
|
|
-this.lbl_farmMapDes.string = "" + o + t.value + "次" + a + "(" + e + "/" + t.value + ")";
|
|
|
+this.lbl_farmMapDes.string = "<color=#7E411F>" + o + "<color=#FF0000>" + t.value + "</c>次" + a + " <color=#FF0000>" + e + "</c>/" + t.value + "</color>";
|
|
|
}
|
|
|
};
|
|
|
e.prototype.clickGetFarmMapRewardBtn = function() {
|
|
|
@@ -14935,9 +15068,13 @@ case 5:
|
|
|
if (o >= 3) {
|
|
|
this.isGray = !1;
|
|
|
this.node_getOrderReward.setGray(!1, !0);
|
|
|
+this.node_getOrderReward.getComponent(cc.Animation).play();
|
|
|
+this.node_orderHand.active = !0;
|
|
|
} else {
|
|
|
this.isGray = !0;
|
|
|
this.node_getOrderReward.setGray(!0, !0);
|
|
|
+this.node_getOrderReward.getComponent(cc.Animation).stop();
|
|
|
+this.node_orderHand.active = !1;
|
|
|
}
|
|
|
return [ 3, 7 ];
|
|
|
|
|
|
@@ -14961,6 +15098,9 @@ return [ 2 ];
|
|
|
e.prototype.clickGetOrderRewardBtn = function() {
|
|
|
this.isGray ? mk.tip.pop("订单未完成") : this.getOrderReward();
|
|
|
};
|
|
|
+e.prototype.getIsCanGetOrderReward = function() {
|
|
|
+return !this.isGray;
|
|
|
+};
|
|
|
e.prototype.getOrderReward = function() {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
var t, e;
|
|
|
@@ -14999,35 +15139,56 @@ switch (s.label) {
|
|
|
case 0:
|
|
|
o = function(o) {
|
|
|
var i, s, l, p;
|
|
|
-return c(this, function(c) {
|
|
|
-switch (c.label) {
|
|
|
+return c(this, function(u) {
|
|
|
+switch (u.label) {
|
|
|
case 0:
|
|
|
-if (t != n.orderPicIdArray[o].picID) return [ 3, 5 ];
|
|
|
-if (!((i = gData.gameData.playerProp.orderData.orderTaskList[o]).completeCount < i.taskCount)) return [ 3, 4 ];
|
|
|
+if (t != n.orderPicIdArray[o].picID) return [ 3, 6 ];
|
|
|
+if (!((i = gData.gameData.playerProp.orderData.orderTaskList[o]).completeCount < i.taskCount)) return [ 3, 5 ];
|
|
|
s = "";
|
|
|
s = a ? "game/coregame/texture/plant_icons/plantIcon_" : "game/coregame/texture/factory_icons/factory_";
|
|
|
+return [ 4, n.updataOrderProgress(n.orderPicIdArray[o].ID) ];
|
|
|
+
|
|
|
+case 1:
|
|
|
+u.sent();
|
|
|
+l = function(a) {
|
|
|
+var i, l;
|
|
|
+return c(this, function(c) {
|
|
|
+switch (c.label) {
|
|
|
+case 0:
|
|
|
return [ 4, mk.pool.getPrefab("game/prefab/crop") ];
|
|
|
|
|
|
case 1:
|
|
|
-l = c.sent();
|
|
|
+i = c.sent();
|
|
|
return [ 4, mk.loader.load(s + t, cc.SpriteFrame) ];
|
|
|
|
|
|
case 2:
|
|
|
-p = c.sent();
|
|
|
-l.getComponent(cc.Sprite).spriteFrame = p;
|
|
|
-return [ 4, n.updataOrderProgress(n.orderPicIdArray[o].ID) ];
|
|
|
+l = c.sent();
|
|
|
+i.getComponent(cc.Sprite).spriteFrame = l;
|
|
|
+mk.fly.playFlyAniExtra(e, n.sp_cropIcon[o].node, i, .6, .2 * a, function() {
|
|
|
+1 == a && r.doFlyOrderAni(o);
|
|
|
+});
|
|
|
+return [ 2 ];
|
|
|
+}
|
|
|
+});
|
|
|
+};
|
|
|
+p = 0;
|
|
|
+u.label = 2;
|
|
|
+
|
|
|
+case 2:
|
|
|
+return 3 == p ? [ 3, 5 ] : [ 5, l(p) ];
|
|
|
|
|
|
case 3:
|
|
|
-c.sent();
|
|
|
-mk.fly.playFlyAniExtra(e, n.sp_cropIcon[o].node, l, .6, function() {
|
|
|
-r.doFlyOrderAni(o);
|
|
|
-});
|
|
|
-c.label = 4;
|
|
|
+u.sent();
|
|
|
+u.label = 4;
|
|
|
|
|
|
case 4:
|
|
|
-return [ 2, "break" ];
|
|
|
+++p;
|
|
|
+return [ 3, 2 ];
|
|
|
|
|
|
case 5:
|
|
|
+return [ 2, "break" ];
|
|
|
+
|
|
|
+case 6:
|
|
|
return [ 2 ];
|
|
|
}
|
|
|
});
|
|
|
@@ -15066,8 +15227,10 @@ break;
|
|
|
if (a) {
|
|
|
this.isGray = !1;
|
|
|
this.node_getOrderReward.setGray(!1, !0);
|
|
|
+this.node_getOrderReward.getComponent(cc.Animation).play();
|
|
|
+this.node_orderHand.active = !0;
|
|
|
mk.ui.closeAllUI();
|
|
|
-mk.guide.open(3);
|
|
|
+mk.guide.open(3) || mk.tip.pop("订单已完成,快领奖吧!");
|
|
|
}
|
|
|
if (i = e.orderTaskList[t]) if (i.completeCount == i.taskCount) {
|
|
|
this.lbl_progress[t].node.active = !1;
|
|
|
@@ -15222,7 +15385,7 @@ type: cc.Node,
|
|
|
displayName: "图鉴种植节点"
|
|
|
}) ], e.prototype, "node_farmMapProduct", void 0);
|
|
|
i([ y({
|
|
|
-type: cc.Label,
|
|
|
+type: cc.RichText,
|
|
|
displayName: "描述"
|
|
|
}) ], e.prototype, "lbl_farmMapDes", void 0);
|
|
|
i([ y({
|
|
|
@@ -15253,6 +15416,10 @@ i([ y({
|
|
|
displayName: "领奖按钮",
|
|
|
type: p.default
|
|
|
}) ], e.prototype, "node_getOrderReward", void 0);
|
|
|
+i([ y({
|
|
|
+displayName: "手指",
|
|
|
+type: cc.Node
|
|
|
+}) ], e.prototype, "node_orderHand", void 0);
|
|
|
return i([ f ], e);
|
|
|
}(cc.Component);
|
|
|
a.default = m;
|
|
|
@@ -16235,17 +16402,23 @@ this.curDes = "";
|
|
|
}
|
|
|
t.prototype.open = function(t, e) {
|
|
|
void 0 === e && (e = "");
|
|
|
-if ("0" != gData.gameData.configs.ServerConfig.NewUserGuide) {
|
|
|
+if ("0" == gData.gameData.configs.ServerConfig.NewUserGuide) return !1;
|
|
|
this.curDes = e;
|
|
|
this.crtGuideID = gData.gameData.getProp(o.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 {
|
|
|
+if (this.crtGuideID >= 9999) {
|
|
|
+mk.console.log("新手引导已做完");
|
|
|
+return !1;
|
|
|
+}
|
|
|
+if (t <= this.crtGuideID && this.crtGuideID > 0) {
|
|
|
+mk.console.log("当前引导已做过:" + t);
|
|
|
+return !1;
|
|
|
+}
|
|
|
gData.guideData.crtID = t;
|
|
|
this.crtGuideID = t;
|
|
|
mk.ui.openPanel("module/guide/guide", n.OpenActionType.normal, this.ui);
|
|
|
this.setGuideID(this.crtGuideID++);
|
|
|
-}
|
|
|
-}
|
|
|
+return !0;
|
|
|
};
|
|
|
t.prototype.setGuideID = function(t) {
|
|
|
if (4 == t) {
|
|
|
@@ -16983,6 +17156,7 @@ e.call = null;
|
|
|
e.getType = 0;
|
|
|
e.init_reward = !1;
|
|
|
e.node_fly = null;
|
|
|
+e.isMatchOrder = !1;
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.openPanel = function(t, e, a, o) {
|
|
|
@@ -16991,6 +17165,7 @@ this.plantID = e;
|
|
|
this.call = a;
|
|
|
this.node_fly = o;
|
|
|
this.config = gData.gameData.getProductMap(this.plantID);
|
|
|
+this.judgeIsMatchOrder();
|
|
|
var n = mk.guide.isGuiding(), i = Math.random(), r = gData.adData.getPerByEcpm(s.RateConfig.RC_superDouble);
|
|
|
!n && i <= r ? mk.ui.openPanel("game/prefab/uiPanel/HarvestPanel") : this.getNormalReward();
|
|
|
};
|
|
|
@@ -17000,7 +17175,7 @@ t.prototype.setAdData.call(this, e);
|
|
|
gData.reward.data = gData.harvestData.adData.videoRedMoney.videoRewardList;
|
|
|
gData.reward.callback = gData.harvestData.call;
|
|
|
var a = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
|
|
|
-gData.reward.getReward(a);
|
|
|
+gData.reward.getReward(a, this.isMatchOrder);
|
|
|
gData.harvestData.call = null;
|
|
|
};
|
|
|
e.prototype.getNormalReward = function() {
|
|
|
@@ -17009,12 +17184,16 @@ var t, e, a, o;
|
|
|
return c(this, function(n) {
|
|
|
switch (n.label) {
|
|
|
case 0:
|
|
|
+return [ 4, mk.time.WaitForSeconds(.5) ];
|
|
|
+
|
|
|
+case 1:
|
|
|
+n.sent();
|
|
|
t = {
|
|
|
id: this.config.id
|
|
|
};
|
|
|
return [ 4, mk.http.sendData("redMoney/addRedMoneyByFarm", t) ];
|
|
|
|
|
|
-case 1:
|
|
|
+case 2:
|
|
|
if ((e = n.sent()) && 0 != e.errcode) return [ 2 ];
|
|
|
if (e.data.redMoneyAddition <= 0) console.log("返回奖励为0"); else {
|
|
|
this.getType = 0;
|
|
|
@@ -17025,13 +17204,24 @@ rewardNum: e.data.redMoneyAddition
|
|
|
gData.reward.data = a;
|
|
|
gData.reward.callback = this.call;
|
|
|
o = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
|
|
|
-gData.reward.getReward(o);
|
|
|
+gData.reward.getReward(o, this.isMatchOrder);
|
|
|
}
|
|
|
return [ 2 ];
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
+e.prototype.judgeIsMatchOrder = function() {
|
|
|
+var t = gData.gameData.playerProp.orderData;
|
|
|
+if (t && t.orderTaskList) for (var e = gData.gameData.configs.Product, a = t.orderTaskList, o = a.length, n = 0; n != o; ++n) {
|
|
|
+var i = a[n];
|
|
|
+if (i.Id <= e.length && e[i.Id - 1].picture == this.plantID) {
|
|
|
+this.isMatchOrder = !0;
|
|
|
+return;
|
|
|
+}
|
|
|
+}
|
|
|
+this.isMatchOrder = !1;
|
|
|
+};
|
|
|
return i([ p ], e);
|
|
|
}(l.Data);
|
|
|
a.default = u;
|
|
|
@@ -22965,28 +23155,37 @@ var e = gData.gameData.playerProp.orderData, a = gData.gameData.playerProp.copyO
|
|
|
if (e && e.orderTaskList) {
|
|
|
for (var o = e.orderTaskList, n = gData.gameData.configs.Product, i = 0; i != o.length; ++i) {
|
|
|
var c = o[i];
|
|
|
-if (a[i] < c.taskCount && c.Id <= n.length) {
|
|
|
+if (!(a[i] < c.taskCount && c.Id <= n.length)) break;
|
|
|
for (var s = n[c.Id - 1], l = this.pastureIcons.length, p = 0; p < l; p++) if (s.picture == this.pastureIcons[p].data.productID && this.pastureIcons[p].data.state == r.PastureState.Empty) {
|
|
|
gData.gameData.nextCanProduct = gData.gameData.getProductMap(this.pastureIcons[p].data.productID);
|
|
|
gData.gameData.nextMake = this.pastureIcons[p];
|
|
|
+gData.gameData.nextType = 2;
|
|
|
return this.pastureIcons[p];
|
|
|
}
|
|
|
-} else for (l = this.pastureIcons.length, p = 0; p < l; p++) if (this.pastureIcons[p].data.state == r.PastureState.Empty) {
|
|
|
-gData.gameData.nextCanProduct = gData.gameData.getProductMap(this.pastureIcons[p].data.productID);
|
|
|
-gData.gameData.nextMake = this.pastureIcons[p];
|
|
|
-return this.pastureIcons[p];
|
|
|
}
|
|
|
+return 1 == t.state ? null : this.doSameCheckLogic(t);
|
|
|
}
|
|
|
-if (1 == t.state) return null;
|
|
|
-for (l = this.pastureIcons.length, p = 0; p < l; p++) if (this.pastureIcons[p].data.state == r.PastureState.Empty) {
|
|
|
-gData.gameData.nextCanProduct = gData.gameData.getProductMap(this.pastureIcons[p].data.productID);
|
|
|
-gData.gameData.nextMake = this.pastureIcons[p];
|
|
|
-return this.pastureIcons[p];
|
|
|
+return this.doSameCheckLogic(t);
|
|
|
+};
|
|
|
+t.prototype.doSameCheckLogic = function(t) {
|
|
|
+if (0 == t.state) {
|
|
|
+for (var e = this.pastureIcons.length, a = 0; a < e; a++) if (this.pastureIcons[a].data.state == r.PastureState.Empty) {
|
|
|
+gData.gameData.nextCanProduct = gData.gameData.getProductMap(this.pastureIcons[a].data.productID);
|
|
|
+gData.gameData.nextMake = this.pastureIcons[a];
|
|
|
+gData.gameData.nextType = 2;
|
|
|
+return this.pastureIcons[a];
|
|
|
+}
|
|
|
+} else {
|
|
|
+var o = gData.gameData.doFarmMapDataCheck(1, {
|
|
|
+state: !1
|
|
|
+});
|
|
|
+if (o) return o;
|
|
|
+for (e = this.pastureIcons.length, a = 0; a < e; a++) if (this.pastureIcons[a].data.state == r.PastureState.Empty) {
|
|
|
+gData.gameData.nextCanProduct = gData.gameData.getProductMap(this.pastureIcons[a].data.productID);
|
|
|
+gData.gameData.nextMake = this.pastureIcons[a];
|
|
|
+gData.gameData.nextType = 2;
|
|
|
+return this.pastureIcons[a];
|
|
|
}
|
|
|
-} else for (l = this.pastureIcons.length, p = 0; p < l; p++) if (this.pastureIcons[p].data.state == r.PastureState.Empty) {
|
|
|
-gData.gameData.nextCanProduct = gData.gameData.getProductMap(this.pastureIcons[p].data.productID);
|
|
|
-gData.gameData.nextMake = this.pastureIcons[p];
|
|
|
-return this.pastureIcons[p];
|
|
|
}
|
|
|
return null;
|
|
|
};
|
|
|
@@ -23060,10 +23259,13 @@ this.productArr = [];
|
|
|
this.init_itemIndex = -1;
|
|
|
this.init_lock = -1;
|
|
|
this.init_ani = !1;
|
|
|
+this.productIndex = -1;
|
|
|
}
|
|
|
-t.prototype.openPanel = function(t, e) {
|
|
|
+t.prototype.openPanel = function(t, e, a) {
|
|
|
+void 0 === a && (a = -1);
|
|
|
this.tab = t;
|
|
|
this.configID = e;
|
|
|
+this.productIndex = a;
|
|
|
this.productArr = gData.gameData.getProductArrByType(t);
|
|
|
mk.ui.openPanel("game/prefab/uiPanel/PlantPanel");
|
|
|
};
|
|
|
@@ -23445,6 +23647,7 @@ e.prototype.start = function() {
|
|
|
gData.plantData.init_itemIndex = -1;
|
|
|
gData.plantData.init_lock = -1;
|
|
|
this.initScollView();
|
|
|
+mk.event.emit("moveUpAndDownFarmMapUI", !0);
|
|
|
};
|
|
|
e.prototype.getItemDataByID = function(t) {
|
|
|
for (var e = this.list_data.length, a = 0; a < e; a++) if (this.list_data[a].picture == t) return a;
|
|
|
@@ -23470,10 +23673,17 @@ a.destroy();
|
|
|
}
|
|
|
};
|
|
|
e.prototype.initScollView = function() {
|
|
|
+var t = this;
|
|
|
this.list_data = gData.plantData.productArr;
|
|
|
this.tableView.node.emit("srollview-init", this.list_data);
|
|
|
+gData.plantData.productIndex > 1 && cc.tween(this).delay(.2).call(function() {
|
|
|
+t.tableView.contentMoveByIndex(gData.plantData.productIndex - 1, .1);
|
|
|
+}).start();
|
|
|
};
|
|
|
e.prototype.onDestroy = function() {};
|
|
|
+e.prototype.closeUI = function() {
|
|
|
+mk.event.emit("moveUpAndDownFarmMapUI", !1);
|
|
|
+};
|
|
|
i([ l({
|
|
|
type: r.default,
|
|
|
displayName: "滚动视图"
|
|
|
@@ -25771,24 +25981,28 @@ gData.gameData.playerProp.redMoney += gData.reward.data[e].rewardNum;
|
|
|
} else gData.reward.data[e].rewardType == r.RewardType.rmb || gData.reward.data[e].rewardType == r.RewardType.pigRmb && gData.reward.data[e].rewardNum && (gData.gameData.playerProp.piggyBank += gData.reward.data[e].rewardNum);
|
|
|
gData.reward.data = [];
|
|
|
};
|
|
|
-e.prototype.flyCoinAnim = function(t) {
|
|
|
-var e = this;
|
|
|
+e.prototype.flyCoinAnim = function(t, e) {
|
|
|
+var a = this;
|
|
|
void 0 === t && (t = null);
|
|
|
-if (gData.reward.data && gData.reward.data.length) for (var a = gData.reward.data.length, o = 0; o < a; o++) if (gData.reward.data[o].rewardType !== r.RewardType.rmb && 0 != gData.reward.data[o].rewardNum) {
|
|
|
+void 0 === e && (e = !1);
|
|
|
+if (gData.reward.data && gData.reward.data.length) for (var o = gData.reward.data.length, n = 0; n < o; n++) if (gData.reward.data[n].rewardType !== r.RewardType.rmb && 0 != gData.reward.data[n].rewardNum) {
|
|
|
mk.audio.playEffect("redmoney");
|
|
|
-var n = "", i = 10, c = -1;
|
|
|
-if (gData.reward.data[o].rewardType === r.RewardType.productTimes) {
|
|
|
-n = "Canvas/主界面层/game/功能按钮/底部按钮/中间按钮";
|
|
|
-i = 5;
|
|
|
-c = .5;
|
|
|
+var i = "", c = 10;
|
|
|
+e && (c = 4);
|
|
|
+var s = -1;
|
|
|
+if (gData.reward.data[n].rewardType === r.RewardType.productTimes) {
|
|
|
+i = "Canvas/主界面层/game/功能按钮/底部按钮/中间按钮";
|
|
|
+c = 5;
|
|
|
+s = .5;
|
|
|
}
|
|
|
-mk.fly.PlayCoinAnim(gData.reward.data[o].rewardType, i, t, n, function() {
|
|
|
-e.addReward();
|
|
|
-}, c);
|
|
|
+mk.fly.PlayCoinAnim(gData.reward.data[n].rewardType, c, t, i, function() {
|
|
|
+a.addReward();
|
|
|
+}, s);
|
|
|
}
|
|
|
};
|
|
|
-e.prototype.getReward = function(t) {
|
|
|
-this.flyCoinAnim(t);
|
|
|
+e.prototype.getReward = function(t, e) {
|
|
|
+void 0 === e && (e = !1);
|
|
|
+this.flyCoinAnim(t, e);
|
|
|
if (this.callback) {
|
|
|
this.callback();
|
|
|
this.callback = null;
|
|
|
@@ -28898,6 +29112,9 @@ var o = function() {
|
|
|
function t() {
|
|
|
this.offTime = 0;
|
|
|
}
|
|
|
+t.WaitForSeconds = function() {
|
|
|
+throw new Error("Method not implemented.");
|
|
|
+};
|
|
|
t.prototype.setServerTime = function(t) {
|
|
|
this.offTime = t - Math.ceil(new Date().getTime() / 1e3);
|
|
|
};
|