|
@@ -6390,16 +6390,16 @@ return e;
|
|
|
}
|
|
}
|
|
|
e.prototype.update = function() {
|
|
e.prototype.update = function() {
|
|
|
if (gData.cashPro.init_load) {
|
|
if (gData.cashPro.init_load) {
|
|
|
-this.showLoad();
|
|
|
|
|
gData.cashPro.init_load = !1;
|
|
gData.cashPro.init_load = !1;
|
|
|
|
|
+this.showLoad();
|
|
|
}
|
|
}
|
|
|
if (gData.cashPro.init_success) {
|
|
if (gData.cashPro.init_success) {
|
|
|
-this.tixianSuccess();
|
|
|
|
|
gData.cashPro.init_success = !1;
|
|
gData.cashPro.init_success = !1;
|
|
|
|
|
+this.tixianSuccess();
|
|
|
}
|
|
}
|
|
|
if (gData.cashPro.init_fail) {
|
|
if (gData.cashPro.init_fail) {
|
|
|
-this.tixianFail();
|
|
|
|
|
gData.cashPro.init_fail = !1;
|
|
gData.cashPro.init_fail = !1;
|
|
|
|
|
+this.tixianFail();
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
e.prototype.showLoad = function() {
|
|
e.prototype.showLoad = function() {
|
|
@@ -8121,9 +8121,13 @@ return [ 2 ];
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
e.prototype.make = function(t) {
|
|
e.prototype.make = function(t) {
|
|
|
|
|
+return r(this, void 0, void 0, function() {
|
|
|
|
|
+var e, o;
|
|
|
|
|
+return c(this, function() {
|
|
|
if (this.data.state == s.FactroyState.Empty) {
|
|
if (this.data.state == s.FactroyState.Empty) {
|
|
|
gData.gameData.isProducting = !0;
|
|
gData.gameData.isProducting = !0;
|
|
|
-var e = gData.gameData.getProductMap(t), o = Date.now() + 1e3 * e.time;
|
|
|
|
|
|
|
+e = gData.gameData.getProductMap(t);
|
|
|
|
|
+o = Date.now() + 1e3 * e.time;
|
|
|
this.data.state = s.FactroyState.Producting;
|
|
this.data.state = s.FactroyState.Producting;
|
|
|
this.data.productID = e.picture;
|
|
this.data.productID = e.picture;
|
|
|
this.data.growSpan = o;
|
|
this.data.growSpan = o;
|
|
@@ -8132,7 +8136,11 @@ this.getComponent(l.MoveToCenter).move();
|
|
|
gData.gameData.changeLeftTimes(-1);
|
|
gData.gameData.changeLeftTimes(-1);
|
|
|
gData.adData.checkPopRed();
|
|
gData.adData.checkPopRed();
|
|
|
gData.gameData.isProducting = !1;
|
|
gData.gameData.isProducting = !1;
|
|
|
|
|
+console.log("-----");
|
|
|
} else mk.tip.pop("商品已满!");
|
|
} else mk.tip.pop("商品已满!");
|
|
|
|
|
+return [ 2 ];
|
|
|
|
|
+});
|
|
|
|
|
+});
|
|
|
};
|
|
};
|
|
|
e.prototype.clickSpeedUp = function() {
|
|
e.prototype.clickSpeedUp = function() {
|
|
|
mk.ui.openPanel("module/speedUpUI/speedUp");
|
|
mk.ui.openPanel("module/speedUpUI/speedUp");
|
|
@@ -10896,9 +10904,6 @@ var i = this;
|
|
|
void 0 === n && (n = null);
|
|
void 0 === n && (n = null);
|
|
|
void 0 === a && (a = -1);
|
|
void 0 === a && (a = -1);
|
|
|
var r = mk.math.random(.3, 1, !1);
|
|
var r = mk.math.random(.3, 1, !1);
|
|
|
-cc.tween(e).to(r, {
|
|
|
|
|
-scale: .8
|
|
|
|
|
-}).start();
|
|
|
|
|
console.log("---");
|
|
console.log("---");
|
|
|
var c = null, l = null;
|
|
var c = null, l = null;
|
|
|
if ("string" == typeof o) {
|
|
if ("string" == typeof o) {
|
|
@@ -20622,9 +20627,19 @@ return [ 2 ];
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
e.prototype.onEat = function() {
|
|
e.prototype.onEat = function() {
|
|
|
-if (gData.gameData.leftTimes <= 0) mk.ui.openPanel("module/speedUpUI/productReward"); else if (this.state == s.PastureState.Empty) {
|
|
|
|
|
|
|
+return r(this, void 0, void 0, function() {
|
|
|
|
|
+var t, e;
|
|
|
|
|
+return c(this, function(o) {
|
|
|
|
|
+switch (o.label) {
|
|
|
|
|
+case 0:
|
|
|
|
|
+if (gData.gameData.leftTimes <= 0) {
|
|
|
|
|
+mk.ui.openPanel("module/speedUpUI/productReward");
|
|
|
|
|
+return [ 2 ];
|
|
|
|
|
+}
|
|
|
|
|
+if (this.state != s.PastureState.Empty) return [ 3, 2 ];
|
|
|
gData.gameData.isProducting = !0;
|
|
gData.gameData.isProducting = !0;
|
|
|
-var t = gData.gameData.getProductMap(this.data.productID), e = Date.now() + 1e3 * t.time;
|
|
|
|
|
|
|
+t = gData.gameData.getProductMap(this.data.productID);
|
|
|
|
|
+e = Date.now() + 1e3 * t.time;
|
|
|
this.data.state = s.PastureState.Growing;
|
|
this.data.state = s.PastureState.Growing;
|
|
|
this.data.productID = this.data.productID;
|
|
this.data.productID = this.data.productID;
|
|
|
this.data.growSpan = e;
|
|
this.data.growSpan = e;
|
|
@@ -20633,7 +20648,20 @@ this.eatNode.active = !1;
|
|
|
this.getComponent(l.MoveToCenter).move();
|
|
this.getComponent(l.MoveToCenter).move();
|
|
|
gData.gameData.changeLeftTimes(-1);
|
|
gData.gameData.changeLeftTimes(-1);
|
|
|
gData.gameData.isProducting = !1;
|
|
gData.gameData.isProducting = !1;
|
|
|
|
|
+return [ 4, gData.gameData.updateNewTaskProgress() ];
|
|
|
|
|
+
|
|
|
|
|
+case 1:
|
|
|
|
|
+if (o.sent()) {
|
|
|
|
|
+this.eatNode.parent.convertToWorldSpaceAR(this.eatNode.getPosition());
|
|
|
|
|
+gData.gameData.gameStyle.dpFlyRedAni();
|
|
|
}
|
|
}
|
|
|
|
|
+o.label = 2;
|
|
|
|
|
+
|
|
|
|
|
+case 2:
|
|
|
|
|
+return [ 2 ];
|
|
|
|
|
+}
|
|
|
|
|
+});
|
|
|
|
|
+});
|
|
|
};
|
|
};
|
|
|
e.prototype.clickSpeedUp = function() {
|
|
e.prototype.clickSpeedUp = function() {
|
|
|
mk.ui.openPanel("module/speedUpUI/speedUp");
|
|
mk.ui.openPanel("module/speedUpUI/speedUp");
|
|
@@ -21411,17 +21439,36 @@ return [ 2 ];
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
e.prototype.clickMake = function() {
|
|
e.prototype.clickMake = function() {
|
|
|
|
|
+return r(this, void 0, void 0, function() {
|
|
|
|
|
+var t;
|
|
|
|
|
+return c(this, function(e) {
|
|
|
|
|
+switch (e.label) {
|
|
|
|
|
+case 0:
|
|
|
mk.audio.playEffect("button");
|
|
mk.audio.playEffect("button");
|
|
|
-if (gData.gameData.leftTimes <= 0) mk.ui.openPanel("module/speedUpUI/productReward"); else if (gData.gameData.isProducting) mk.tip.pop("点击太快了"); else {
|
|
|
|
|
|
|
+if (gData.gameData.leftTimes <= 0) {
|
|
|
|
|
+mk.ui.openPanel("module/speedUpUI/productReward");
|
|
|
|
|
+return [ 2 ];
|
|
|
|
|
+}
|
|
|
|
|
+if (gData.gameData.isProducting) {
|
|
|
|
|
+mk.tip.pop("点击太快了");
|
|
|
|
|
+return [ 2 ];
|
|
|
|
|
+}
|
|
|
if (this.data.tab == l.ProductType.nzw) {
|
|
if (this.data.tab == l.ProductType.nzw) {
|
|
|
gData.farmSystem.plant(this.data.picture);
|
|
gData.farmSystem.plant(this.data.picture);
|
|
|
gData.gameData.nextMake = null;
|
|
gData.gameData.nextMake = null;
|
|
|
gData.gameData.setNextProduct(!1);
|
|
gData.gameData.setNextProduct(!1);
|
|
|
} else gData.factorySystem.make(this.data.picture);
|
|
} else gData.factorySystem.make(this.data.picture);
|
|
|
-gData.gameData.updateNewTaskProgress(!0);
|
|
|
|
|
-var t = this.nameIcon.node.parent.convertToWorldSpaceAR(this.nameIcon.node.getPosition());
|
|
|
|
|
|
|
+return [ 4, gData.gameData.updateNewTaskProgress(!0) ];
|
|
|
|
|
+
|
|
|
|
|
+case 1:
|
|
|
|
|
+if (e.sent()) {
|
|
|
|
|
+t = this.nameIcon.node.parent.convertToWorldSpaceAR(this.nameIcon.node.getPosition());
|
|
|
gData.gameData.gameStyle.dpFlyRedAni(t);
|
|
gData.gameData.gameStyle.dpFlyRedAni(t);
|
|
|
}
|
|
}
|
|
|
|
|
+return [ 2 ];
|
|
|
|
|
+}
|
|
|
|
|
+});
|
|
|
|
|
+});
|
|
|
};
|
|
};
|
|
|
e.prototype.getDesByType = function() {
|
|
e.prototype.getDesByType = function() {
|
|
|
var t = "";
|
|
var t = "";
|
|
@@ -22160,7 +22207,7 @@ t.lbl_progress.string = e + "/" + o;
|
|
|
}).start();
|
|
}).start();
|
|
|
} else {
|
|
} else {
|
|
|
this.node_1.active = !1;
|
|
this.node_1.active = !1;
|
|
|
-this.node_2.active = !1;
|
|
|
|
|
|
|
+this.node_2.active = !0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -24719,7 +24766,7 @@ var a = "", i = 10, c = -1;
|
|
|
if (gData.reward.data[n].rewardType === r.RewardType.productTimes) {
|
|
if (gData.reward.data[n].rewardType === r.RewardType.productTimes) {
|
|
|
a = "Canvas/主界面层/game/功能按钮/底部按钮/中间按钮";
|
|
a = "Canvas/主界面层/game/功能按钮/底部按钮/中间按钮";
|
|
|
i = 5;
|
|
i = 5;
|
|
|
-c = .8;
|
|
|
|
|
|
|
+c = .5;
|
|
|
}
|
|
}
|
|
|
mk.fly.PlayCoinAnim(gData.reward.data[n].rewardType, i, t, a, function() {
|
|
mk.fly.PlayCoinAnim(gData.reward.data[n].rewardType, i, t, a, function() {
|
|
|
e.addReward();
|
|
e.addReward();
|