|
|
@@ -167,15 +167,14 @@ export default class Game extends cc.Component {
|
|
|
// }
|
|
|
// this.autoPopSign = false;
|
|
|
// }
|
|
|
- if(gData.gameData.funOpenData[11] == "1")
|
|
|
- {
|
|
|
+ if (gData.gameData.funOpenData[11] == "1") {
|
|
|
let isTeach = mk.guide.open(10);
|
|
|
if (isTeach) {
|
|
|
mk.event.register("event_guide", this.initGuideEvent.bind(this), this);
|
|
|
//mk.guide.continueCallBack = this.judgeContinueTeach;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
let value = mk.storage.getStorage('loadingFinish');
|
|
|
if (!value) {
|
|
|
mk.storage.setStorage('loadingFinish', 1);
|
|
|
@@ -232,7 +231,7 @@ export default class Game extends cc.Component {
|
|
|
|
|
|
if (!this.isShowAddProductTimesUI && needAdd) {
|
|
|
this.isShowAddProductTimesUI = true;
|
|
|
- if (add > 0) {
|
|
|
+ if (add > 0) {
|
|
|
add = add > offset ? offset : add;
|
|
|
if (add > 0) {
|
|
|
//add = add > gData.gameData.maxTimes ? gData.gameData.maxTimes : add;
|
|
|
@@ -525,6 +524,13 @@ export default class Game extends cc.Component {
|
|
|
// {
|
|
|
// mk.ui.openPanel('module/speedUpUI/productReward');
|
|
|
// }
|
|
|
+ if (gData.gameData.prohibitProductionAd[gData.loginData.userChannel - 1] == "1") {
|
|
|
+ if (gData.gameData.playerProp.curProductionAdTimes >= gData.gameData.productionAdMaxTimes) {
|
|
|
+ mk.tip.pop('今日领取生产次数已达上限!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
mk.ui.openPanel('module/speedUpUI/productReward');
|
|
|
return;
|
|
|
}
|
|
|
@@ -534,14 +540,6 @@ export default class Game extends cc.Component {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if(gData.gameData.prohibitProductionAd[gData.loginData.userChannel - 1] == "1")
|
|
|
- {
|
|
|
- if(gData.gameData.playerProp.curProductionAdTimes >= gData.gameData.productionAdMaxTimes)
|
|
|
- {
|
|
|
- mk.tip.pop('今日领取生产次数已达上限!');
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
let flyRed = await gData.gameData.makeProduct();
|
|
|
|
|
|
@@ -730,9 +728,8 @@ export default class Game extends cc.Component {
|
|
|
// namePath = 'game/coregame/texture/factory_icons/factoryNams/factory_name_icon_';
|
|
|
// }
|
|
|
|
|
|
-
|
|
|
- if(gData.gameData.funOpenData[12] == "0")
|
|
|
- {
|
|
|
+
|
|
|
+ if (gData.gameData.funOpenData[12] == "0") {
|
|
|
this.node_farmMapUI.active = false;
|
|
|
return;
|
|
|
}
|
|
|
@@ -746,9 +743,8 @@ export default class Game extends cc.Component {
|
|
|
let data = list_data[i];
|
|
|
//剔除前三个农作物
|
|
|
let extraCondition = true;
|
|
|
- if(ProductType[key] == ProductType.nzw)
|
|
|
- {
|
|
|
- extraCondition = (data.picture >10003);
|
|
|
+ if (ProductType[key] == ProductType.nzw) {
|
|
|
+ extraCondition = (data.picture > 10003);
|
|
|
}
|
|
|
if (extraCondition && data.picture <= max) {
|
|
|
let state = gData.gameData.getFarmMapRewardState(this.getIndex(data));
|
|
|
@@ -775,7 +771,7 @@ export default class Game extends cc.Component {
|
|
|
let plantName = gData.gameData.getProductMap(data.picture - 1).name;
|
|
|
let des = this.getDesByType(data);
|
|
|
let len = plantName.length;
|
|
|
- this.node_farmMapUI.width = 300 + (len - 2) * 20 + (len - 2)*5;
|
|
|
+ this.node_farmMapUI.width = 300 + (len - 2) * 20 + (len - 2) * 5;
|
|
|
this.lbl_farmMapDes.string = `<color=#7E411F>${des}<color=#FF0000>${data.value}</c>次${plantName} <color=#FF0000>${times}</c>/${data.value}</color>`;
|
|
|
//this.sp_farmMapIcon.spriteFrame = await mk.loader.load('module/farmMap/texture/gift', cc.SpriteFrame);
|
|
|
return;
|
|
|
@@ -1124,15 +1120,14 @@ export default class Game extends cc.Component {
|
|
|
this.node_getOrderReward.getComponent(cc.Animation).play();
|
|
|
this.node_orderHand.active = true;
|
|
|
mk.ui.closeAllUI();
|
|
|
- if(gData.gameData.funOpenData[11] == "1")
|
|
|
- {
|
|
|
+ if (gData.gameData.funOpenData[11] == "1") {
|
|
|
let isGuide = mk.guide.open(12);
|
|
|
if (!isGuide) {
|
|
|
mk.tip.pop("订单已完成,快领奖吧!");
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
mk.tip.pop("订单已完成,快领奖吧!");
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
{
|
|
|
@@ -1206,16 +1201,15 @@ export default class Game extends cc.Component {
|
|
|
// return false;
|
|
|
// }
|
|
|
let leftTimes = gData.gameData.leftTimes;
|
|
|
- if(leftTimes > 0)
|
|
|
- {
|
|
|
+ if (leftTimes > 0) {
|
|
|
mk.guide.curDes = `<color=8A4312><color=ff0000>继续生产${leftTimes}次</c>,很快就\n可以完成订单了!</color>`;
|
|
|
return true;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
// if(gData.gameData.moveMapNode)
|
|
|
// {
|
|
|
// gData.gameData.moveMapNode.move(new cc.Vec3(0, -370, 0));
|
|
|
// }
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
}
|