|
|
@@ -9406,11 +9406,8 @@ this.setState(this.data.state);
|
|
|
};
|
|
|
e.prototype.setState = function(t) {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
-var e, a;
|
|
|
-return c(this, function(o) {
|
|
|
-switch (o.label) {
|
|
|
-case 0:
|
|
|
-if (this.state == t) return [ 3, 8 ];
|
|
|
+return c(this, function() {
|
|
|
+if (this.state != t) {
|
|
|
this._state = t;
|
|
|
this.lockNode.active = !1;
|
|
|
this.canUnlockNode.active = !1;
|
|
|
@@ -9419,72 +9416,44 @@ this.countDown.node.active = !1;
|
|
|
this.process.node.active = !1;
|
|
|
switch (this.state) {
|
|
|
case s.FarmState.Lock:
|
|
|
-return [ 3, 1 ];
|
|
|
-
|
|
|
-case s.FarmState.CanUnlock:
|
|
|
-return [ 3, 2 ];
|
|
|
-
|
|
|
-case s.FarmState.Empty:
|
|
|
-return [ 3, 3 ];
|
|
|
-
|
|
|
-case s.FarmState.Growing:
|
|
|
-return [ 3, 4 ];
|
|
|
-
|
|
|
-case s.FarmState.Ripe:
|
|
|
-return [ 3, 5 ];
|
|
|
-
|
|
|
-case s.FarmState.Sick:
|
|
|
-return [ 3, 7 ];
|
|
|
-}
|
|
|
-return [ 3, 8 ];
|
|
|
-
|
|
|
-case 1:
|
|
|
this.lockNode.active = !0;
|
|
|
-return [ 3, 8 ];
|
|
|
+break;
|
|
|
|
|
|
-case 2:
|
|
|
+case s.FarmState.CanUnlock:
|
|
|
this.lockNode.active = !0;
|
|
|
this.canUnlockNode.active = !0;
|
|
|
-return [ 3, 8 ];
|
|
|
+break;
|
|
|
|
|
|
-case 3:
|
|
|
+case s.FarmState.Empty:
|
|
|
this.idleAni && 0 == this.idleAni.active && (this.idleAni.active = !0);
|
|
|
-return [ 3, 8 ];
|
|
|
+break;
|
|
|
|
|
|
-case 4:
|
|
|
+case s.FarmState.Growing:
|
|
|
this.countDown.node.active = !0;
|
|
|
this.process.node.active = !0;
|
|
|
this.countDown.setData(this.data);
|
|
|
this.process.setData(this.data);
|
|
|
this.idleAni && 1 == this.idleAni.active && (this.idleAni.active = !1);
|
|
|
-return [ 3, 8 ];
|
|
|
+break;
|
|
|
|
|
|
-case 5:
|
|
|
+case s.FarmState.Ripe:
|
|
|
this.plantIcon.node.active = !0;
|
|
|
this.countDown.node.active = !0;
|
|
|
this.process.node.active = !0;
|
|
|
this.countDown.setState(1);
|
|
|
this.process.setData(this.data);
|
|
|
this.plantID = this.data.productID;
|
|
|
-return [ 4, mk.loader.load("game/prefab/ProductShow1", cc.Prefab) ];
|
|
|
-
|
|
|
-case 6:
|
|
|
-e = o.sent();
|
|
|
-(a = cc.instantiate(e)).name = "hb";
|
|
|
-a.parent = this.node;
|
|
|
-return [ 3, 8 ];
|
|
|
+break;
|
|
|
|
|
|
-case 7:
|
|
|
+case s.FarmState.Sick:
|
|
|
this.plantIcon.node.active = !0;
|
|
|
this.countDown.node.active = !0;
|
|
|
this.process.node.active = !0;
|
|
|
this.countDown.setState(0);
|
|
|
this.process.setData(this.data);
|
|
|
-return [ 3, 8 ];
|
|
|
-
|
|
|
-case 8:
|
|
|
-return [ 2 ];
|
|
|
}
|
|
|
+}
|
|
|
+return [ 2 ];
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
@@ -14427,7 +14396,6 @@ this.span = 6e4 * gData.gameData.ProductionRecovery;
|
|
|
gData.gameData.checkTaskFinishUnLock();
|
|
|
gData.gameData.maxProductToServer = !0;
|
|
|
gData.gameData.updateMaxProduct();
|
|
|
-this.registerCallBack();
|
|
|
console.log("===[Jsbsystem 显示开屏广告================================");
|
|
|
mk.ad.ifShowAd && Math.random() <= gData.adData.getPerByEcpm(u.RateConfig.RC_splash) && l.default.showSplash();
|
|
|
this.initRefreshEvent();
|