|
|
@@ -2650,6 +2650,7 @@ this.dogMove.on("finished", this.moveDogFinished, this);
|
|
|
e.prototype.moveDogFinished = function() {
|
|
|
var t = this, e = mk.math.random(5, 8);
|
|
|
this.dogMove.node.active = !1;
|
|
|
+this.dogMove.node.scaleX = 1;
|
|
|
cc.Tween.stopAllByTarget(this.dogMove.node);
|
|
|
cc.tween(this.dogMove.node).delay(e).call(function() {
|
|
|
t.dogMove.node.active = !0;
|
|
|
@@ -6059,6 +6060,9 @@ this.sheepAni.play("sheepStand");
|
|
|
this.hb_node.active = !0;
|
|
|
}
|
|
|
};
|
|
|
+e.prototype.changeDogAni = function() {
|
|
|
+this.node.scaleX = -this.node.scaleX;
|
|
|
+};
|
|
|
i([ s({
|
|
|
displayName: "sheepAni",
|
|
|
type: cc.Animation
|
|
|
@@ -6657,7 +6661,8 @@ case r.none:
|
|
|
break;
|
|
|
|
|
|
case r.scale:
|
|
|
-mk.tween.scale(this.effect_par, .3, void 0, void 0, void 0, "backOut");
|
|
|
+var t = this.effect_par.scale;
|
|
|
+mk.tween.scale(this.effect_par, .3, void 0, t, void 0, "backOut");
|
|
|
break;
|
|
|
|
|
|
case r.centerUnfolding:
|
|
|
@@ -7477,6 +7482,7 @@ function e() {
|
|
|
var e = null !== t && t.apply(this, arguments) || this;
|
|
|
e.countDown = null;
|
|
|
e.showGroup = null;
|
|
|
+e.idleAni = null;
|
|
|
e.configID = 0;
|
|
|
e.sortID = 0;
|
|
|
e.tab = s.ProductType.bmhc;
|
|
|
@@ -7539,12 +7545,16 @@ this._state = t;
|
|
|
this.countDown.node.active = !1;
|
|
|
switch (this.state) {
|
|
|
case s.FactroyState.Lock:
|
|
|
+break;
|
|
|
+
|
|
|
case s.FactroyState.Empty:
|
|
|
+this.idleAni && 0 == this.idleAni.active && (this.idleAni.active = !0);
|
|
|
break;
|
|
|
|
|
|
case s.FactroyState.Producting:
|
|
|
this.countDown.node.active = !0;
|
|
|
this.countDown.setData(this.data);
|
|
|
+this.idleAni && 1 == this.idleAni.active && (this.idleAni.active = !1);
|
|
|
break;
|
|
|
|
|
|
case s.FactroyState.Ripe:
|
|
|
@@ -7649,6 +7659,10 @@ i([ f({
|
|
|
type: cc.Node,
|
|
|
tooltip: "完成品展示节点"
|
|
|
}) ], e.prototype, "showGroup", void 0);
|
|
|
+i([ f({
|
|
|
+type: cc.Node,
|
|
|
+tooltip: "闲置动画"
|
|
|
+}) ], e.prototype, "idleAni", void 0);
|
|
|
return i([ h ], e);
|
|
|
}(cc.Component);
|
|
|
o.FactoryIcon = y;
|
|
|
@@ -8372,6 +8386,7 @@ e.selectNode = null;
|
|
|
e.plantIcon = null;
|
|
|
e.countDown = null;
|
|
|
e.process = null;
|
|
|
+e.idleAni = null;
|
|
|
e.configID = 0;
|
|
|
e.sortID = 0;
|
|
|
e.plantID = 0;
|
|
|
@@ -8425,6 +8440,7 @@ this.canUnlockNode.active = !0;
|
|
|
break;
|
|
|
|
|
|
case s.FarmState.Empty:
|
|
|
+this.idleAni && 0 == this.idleAni.active && (this.idleAni.active = !0);
|
|
|
break;
|
|
|
|
|
|
case s.FarmState.Growing:
|
|
|
@@ -8432,6 +8448,7 @@ 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);
|
|
|
break;
|
|
|
|
|
|
case s.FarmState.Ripe:
|
|
|
@@ -8584,6 +8601,10 @@ i([ y({
|
|
|
type: u.FarmGrowProcess,
|
|
|
tooltip: "成长控制组件"
|
|
|
}) ], e.prototype, "process", void 0);
|
|
|
+i([ y({
|
|
|
+type: cc.Node,
|
|
|
+tooltip: "闲置动画"
|
|
|
+}) ], e.prototype, "idleAni", void 0);
|
|
|
return i([ f ], e);
|
|
|
}(cc.Component);
|
|
|
o.FarmIcon = g;
|
|
|
@@ -10704,12 +10725,12 @@ this._farmData || (this._farmData = []);
|
|
|
var t = this._farmData.length;
|
|
|
if (t < 18) {
|
|
|
for (var e = 31e3, o = null, n = 0; n < 18; n++) {
|
|
|
-o = n < 6 ? {
|
|
|
+o = n < 9 ? {
|
|
|
id: e,
|
|
|
state: s.Empty,
|
|
|
productID: 0,
|
|
|
growSpan: 0
|
|
|
-} : 6 == n ? {
|
|
|
+} : 9 == n ? {
|
|
|
id: e,
|
|
|
state: s.CanUnlock,
|
|
|
productID: 0,
|
|
|
@@ -15760,6 +15781,9 @@ position: this.confirmPosition(e)
|
|
|
easing: "sineOut"
|
|
|
}).start();
|
|
|
};
|
|
|
+e.prototype.clickMapBookBtn = function() {
|
|
|
+mk.ui.openPanel("module/farmMap/farmMap");
|
|
|
+};
|
|
|
i([ l({
|
|
|
type: cc.Node,
|
|
|
tooltip: "地图容器"
|
|
|
@@ -17120,8 +17144,11 @@ return e;
|
|
|
}
|
|
|
e.prototype.start = function() {
|
|
|
this.node.getPosition(this.startPos);
|
|
|
-var t = cc.moveBy(this.duration, cc.v2(this.moveOffset.x, this.moveOffset.y)), e = cc.moveBy(this.duration, cc.v2(this.moveOffset.x, -this.moveOffset.y)), o = cc.sequence([ t, e ]);
|
|
|
-this.node.runAction(cc.repeatForever(o));
|
|
|
+cc.tween(this.node).by(this.duration, {
|
|
|
+y: this.moveOffset.y
|
|
|
+}).by(this.duration, {
|
|
|
+y: -this.moveOffset.y
|
|
|
+}).union().repeatForever().start();
|
|
|
};
|
|
|
i([ s({
|
|
|
displayName: "移动的相对距离"
|
|
|
@@ -17760,6 +17787,7 @@ e.points = null;
|
|
|
e.eatNode = null;
|
|
|
e.countDown = null;
|
|
|
e.showGroup = null;
|
|
|
+e.idleAni = null;
|
|
|
e.animalsArr = new Array();
|
|
|
e.configID = 0;
|
|
|
e.sortID = 0;
|
|
|
@@ -17845,6 +17873,7 @@ break;
|
|
|
|
|
|
case s.PastureState.Empty:
|
|
|
for (e = 0; e < this.animalsArr.length; e++) this.animalsArr[e].setState(s.AnimalState.Hanger, this.configID);
|
|
|
+this.idleAni && 0 == this.idleAni.active && (this.idleAni.active = !0);
|
|
|
break;
|
|
|
|
|
|
case s.PastureState.Growing:
|
|
|
@@ -17853,6 +17882,7 @@ this.eatNode.active = !1;
|
|
|
this.countDown.node.active = !0;
|
|
|
this.countDown.setData(this.data);
|
|
|
for (e = 0; e < this.animalsArr.length; e++) this.animalsArr[e].setState(s.AnimalState.Eat, this.configID);
|
|
|
+this.idleAni && 1 == this.idleAni.active && (this.idleAni.active = !1);
|
|
|
break;
|
|
|
|
|
|
case s.PastureState.Ripe:
|
|
|
@@ -17863,6 +17893,7 @@ this.onProductComplete();
|
|
|
break;
|
|
|
|
|
|
case s.PastureState.Sick:
|
|
|
+this.points.parent.active = !0;
|
|
|
this.countDown.node.active = !0;
|
|
|
this.countDown.setState(0);
|
|
|
for (e = 0; e < this.animalsArr.length; e++) this.animalsArr[e].setState(s.AnimalState.Wait, this.configID);
|
|
|
@@ -17969,6 +18000,10 @@ i([ y({
|
|
|
type: cc.Node,
|
|
|
tooltip: "完成品展示节点"
|
|
|
}) ], e.prototype, "showGroup", void 0);
|
|
|
+i([ y({
|
|
|
+type: cc.Node,
|
|
|
+tooltip: "闲置动画"
|
|
|
+}) ], e.prototype, "idleAni", void 0);
|
|
|
return i([ f ], e);
|
|
|
}(cc.Component);
|
|
|
o.default = g;
|
|
|
@@ -18595,6 +18630,7 @@ e.nameIcon = null;
|
|
|
e.awardLabel = null;
|
|
|
e.timeLabel = null;
|
|
|
e.labUnlock = null;
|
|
|
+e.lbl_progress = null;
|
|
|
e.data = null;
|
|
|
return e;
|
|
|
}
|
|
|
@@ -18649,7 +18685,8 @@ if (!i) {
|
|
|
s = this.getDesByType();
|
|
|
p = gData.gameData.getProductMap(this.data.picture - 1).name;
|
|
|
if (t.picture - 1 == gData.gameData.getMaxProduct(this.data.tab)) {
|
|
|
-this.labUnlock.string = r + "/" + this.data.value + "\n" + s + this.data.value + "次\n" + p;
|
|
|
+this.labUnlock.string = "" + s + this.data.value + "次\n" + p;
|
|
|
+this.lbl_progress.string = r + "/" + this.data.value;
|
|
|
this.labUnlock.node.active = !0;
|
|
|
} else this.labUnlock.node.active = !1;
|
|
|
}
|
|
|
@@ -18713,6 +18750,10 @@ i([ d({
|
|
|
type: cc.Label,
|
|
|
tooltip: "未开条件"
|
|
|
}) ], e.prototype, "labUnlock", void 0);
|
|
|
+i([ d({
|
|
|
+type: cc.Label,
|
|
|
+tooltip: "进度文本"
|
|
|
+}) ], e.prototype, "lbl_progress", void 0);
|
|
|
return i([ u ], e);
|
|
|
}(cc.Component);
|
|
|
o.default = h;
|
|
|
@@ -23190,6 +23231,7 @@ e.lbl_reward_value = null;
|
|
|
e.spr_cash_out = null;
|
|
|
e.lbl_progress = null;
|
|
|
e.node_cash = null;
|
|
|
+e.lbl_remainTimes = null;
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.start = function() {
|
|
|
@@ -23227,6 +23269,7 @@ i([ s(cc.Label) ], e.prototype, "lbl_reward_value", void 0);
|
|
|
i([ s(cc.Sprite) ], e.prototype, "spr_cash_out", void 0);
|
|
|
i([ s(cc.Label) ], e.prototype, "lbl_progress", void 0);
|
|
|
i([ s(cc.Animation) ], e.prototype, "node_cash", void 0);
|
|
|
+i([ s(cc.Label) ], e.prototype, "lbl_remainTimes", void 0);
|
|
|
return i([ c ], e);
|
|
|
}(cc.Component);
|
|
|
o.default = l;
|
|
|
@@ -23617,6 +23660,8 @@ e.isShowByLimitLength = !1;
|
|
|
e.limitLength = 0;
|
|
|
e.direction = r.vertical;
|
|
|
e.isHideAllChild = !1;
|
|
|
+e.limitDataLen = -1;
|
|
|
+e.addOffset = 10;
|
|
|
e.itemData = null;
|
|
|
e.scrollView = null;
|
|
|
e.item = null;
|
|
|
@@ -23673,10 +23718,12 @@ this.itemPosMap = new Map();
|
|
|
this.initItemData = !0;
|
|
|
this.count = 0;
|
|
|
if (!e) {
|
|
|
+-1 != this.limitDataLen && this.itemData.length <= this.limitDataLen && (this.itemInterval += this.addOffset);
|
|
|
this.initItem();
|
|
|
this.initItemPos(0);
|
|
|
this.isHideAllChild && (this.isHideAllChild = !1);
|
|
|
this.scrollView.node.on("scrolling", this.callback, this);
|
|
|
+this.direction == r.horizontal && this.content.width < this.layerWith && (this.node.x = .5 * (this.layerWith - this.content.width) + this.itemInterval / 2);
|
|
|
}
|
|
|
};
|
|
|
e.prototype.updateList = function(t) {
|
|
|
@@ -23754,10 +23801,12 @@ this.itemArr.push(n);
|
|
|
return n;
|
|
|
};
|
|
|
e.prototype.updateContentHeigh = function(t) {
|
|
|
-this.content.height = t > this.layerHeight ? t : this.layerHeight;
|
|
|
+this.content.height = t;
|
|
|
+this.content.height <= this.layerHeight ? this.scrollView.vertical = !1 : this.scrollView.vertical = !0;
|
|
|
};
|
|
|
e.prototype.updateContentWidth = function(t) {
|
|
|
-this.content.width = t > this.layerWith ? t : this.layerWith;
|
|
|
+this.content.width = t;
|
|
|
+this.content.width <= this.layerWith ? this.scrollView.horizontal = !1 : this.scrollView.horizontal = !0;
|
|
|
};
|
|
|
e.prototype.callback = function() {
|
|
|
if (this.direction == r.vertical) {
|
|
|
@@ -24051,6 +24100,16 @@ type: cc.Enum(r)
|
|
|
i([ l({
|
|
|
displayName: "初始化时所有子节点隐藏"
|
|
|
}) ], e.prototype, "isHideAllChild", void 0);
|
|
|
+i([ l({
|
|
|
+displayName: "数据长度限制",
|
|
|
+tooltip: "总数据小于限制长度调大间距"
|
|
|
+}) ], e.prototype, "limitDataLen", void 0);
|
|
|
+i([ l({
|
|
|
+displayName: "间距增加数值",
|
|
|
+visible: function() {
|
|
|
+return -1 != this.limitDataLen;
|
|
|
+}
|
|
|
+}) ], e.prototype, "addOffset", void 0);
|
|
|
return i([ s ], e);
|
|
|
}(cc.Component);
|
|
|
o.default = p;
|
|
|
@@ -24829,33 +24888,55 @@ e.canTouch = !0;
|
|
|
e.onInPolygon = null;
|
|
|
e.onOutPolygon = null;
|
|
|
e.onTouchTap = null;
|
|
|
-e.needPolygon = !1;
|
|
|
+e.needPolygon = !0;
|
|
|
e.points = [];
|
|
|
e.stopPropagation = !1;
|
|
|
+e.isScaleAct = !0;
|
|
|
e.isMoved = !1;
|
|
|
+e.isStart = !1;
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.start = function() {
|
|
|
this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
|
|
|
this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchCancel, this);
|
|
|
this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
|
|
|
+this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
|
|
|
+this.node._touchListener.swallowTouches = !1;
|
|
|
};
|
|
|
e.prototype.onTouchEnd = function(t) {
|
|
|
-if (this.canTouch && this.needPolygon && this.points.length >= 3) {
|
|
|
-var e = t.touch._point, o = this.node.convertToNodeSpaceAR(e), n = this.pointInPoly(o, this.points);
|
|
|
-if (!this.isMoved) if (n) {
|
|
|
+if (!this.isMoved) if (this.isStart) {
|
|
|
this.stopPropagation && (t.propagationStopped = !0);
|
|
|
this.canTouch && this.onInPolygon && this.onInPolygon.emit([]);
|
|
|
this.canTouch && (this.isMoved || this.canTouch && this.onTouchTap && this.onTouchTap.emit([]));
|
|
|
-this.isMoved = !1;
|
|
|
+this.isScaleAct && cc.tween(this.node).to(.1, {
|
|
|
+scale: 1
|
|
|
+}).start();
|
|
|
} else this.canTouch && this.onOutPolygon && this.onOutPolygon.emit([]);
|
|
|
-}
|
|
|
+this.isStart = !1;
|
|
|
+this.isMoved = !1;
|
|
|
};
|
|
|
e.prototype.onTouchMove = function(t) {
|
|
|
-t.getTouches().length > 1 ? this.isMoved = !0 : this.isMoved = cc.Vec2.distance(t.getStartLocation(), t.getLocation()) > 20;
|
|
|
+if (t.getTouches().length > 1) this.isMoved = !0; else {
|
|
|
+var e = t.getLocation(), o = this.node.convertToNodeSpaceAR(e);
|
|
|
+this.isMoved = cc.Intersection.pointInPolygon(o, this.points);
|
|
|
+this.isScaleAct && this.isMoved && cc.tween(this.node).to(.1, {
|
|
|
+scale: 1
|
|
|
+}).start();
|
|
|
+}
|
|
|
};
|
|
|
e.prototype.onTouchCancel = function() {
|
|
|
this.isMoved = !1;
|
|
|
+this.isScaleAct && this.node.setScale(1);
|
|
|
+};
|
|
|
+e.prototype.onTouchStart = function(t) {
|
|
|
+console.log("------" + this.name);
|
|
|
+if (this.canTouch && this.needPolygon && this.points.length >= 3) {
|
|
|
+var e = t.getLocation(), o = this.node.convertToNodeSpaceAR(e);
|
|
|
+this.isStart = cc.Intersection.pointInPolygon(o, this.points);
|
|
|
+}
|
|
|
+this.isScaleAct && this.isStart && cc.tween(this.node).to(.1, {
|
|
|
+scale: 1.1
|
|
|
+}).start();
|
|
|
};
|
|
|
e.prototype.pointInPoly = function(t, e) {
|
|
|
for (var o = !1, n = -1, a = e.length, i = a - 1; ++n < a; i = n) (e[n].y <= t.y && t.y < e[i].y || e[i].y <= t.y && t.y < e[n].y) && t.x < (e[i].x - e[n].x) * (t.y - e[n].y) / (e[i].y - e[n].y) + e[n].x && (o = !o);
|
|
|
@@ -24886,6 +24967,9 @@ tooltip: "多边形定点位置信息(局部坐标,至少3个点)"
|
|
|
i([ s({
|
|
|
tooltip: "点击在多边形区域内时是否阻止事件冒泡"
|
|
|
}) ], e.prototype, "stopPropagation", void 0);
|
|
|
+i([ s({
|
|
|
+tooltip: "是否点击有缩放效果"
|
|
|
+}) ], e.prototype, "isScaleAct", void 0);
|
|
|
return i([ c ], e);
|
|
|
}(cc.Component);
|
|
|
o.TouchHelper = l;
|