kaka 4 лет назад
Родитель
Сommit
eee280f7ae
24 измененных файлов с 208 добавлено и 109 удалено
  1. 12 0
      assets/resources/animation/Main.meta
  2. 6 1
      assets/script/before/main/FactoryIcon.ts
  3. 8 1
      assets/script/before/main/FarmIcon.ts
  4. 7 1
      assets/script/before/main/PastureIcon.ts
  5. 2 0
      assets/script/before/view/data/HarvestData.ts
  6. 3 1
      assets/script/before/view/ui/HarvestPanel.ts
  7. 1 0
      assets/script/game/data/GameData.ts
  8. 0 1
      assets/script/game/game/Farmer.ts
  9. 1 1
      assets/script/game/module/login/Login.ts
  10. 11 11
      assets/script/game/module/reward/Reward.ts
  11. 6 2
      assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATBanner.ts
  12. 6 2
      assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATInterstitial.ts
  13. 2 2
      assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATNative.ts
  14. 3 2
      assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATRewardVideo.ts
  15. 1 1
      assets/script/mk/system/JsbSystem.ts
  16. BIN
      build/jsb-link/assets/main/index.jsc
  17. 0 0
      build/jsb-link/assets/resources/config.json
  18. 0 0
      build/jsb-link/assets/resources/import/2f/2f63e38a-f6a2-47c7-bb1d-2bc6a29d26bb.json
  19. 0 0
      build/jsb-link/assets/resources/import/65/65c9ca7e-c2c7-4b6c-85cb-11c7ebb15e6c.json
  20. 0 0
      build/jsb-link/assets/resources/import/e6/e67940bb-e37a-4807-861d-b355ac3e5cea.json
  21. 0 0
      build/jsb-link/assets/resources/import/e8/e86f7583-0e5e-46f6-ae3f-0904f46acf88.json
  22. 5 4
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ad/SplashAdShowActivity.java
  23. 132 77
      build/jsb-link/js backups (useful for debugging)/main.index.js
  24. 2 2
      packages-hot-update/cfg.json

+ 12 - 0
assets/resources/animation/Main.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "703dc0ab-50b1-46b0-a7e4-8c4424650c62",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 6 - 1
assets/script/before/main/FactoryIcon.ts

@@ -172,6 +172,11 @@ export class FactoryIcon extends cc.Component {
         gData.gameData.setFactoryDataMap(this.configID, this.data);
         gData.gameData.setNextProduct(false);
 
-        gData.farmGradeData.addGradeExp(ExpAddType.EAT_harvest, this.node);
+        if (gData.harvestData.getType == 0) {
+            gData.farmGradeData.addGradeExp(ExpAddType.EAT_harvest, this.node);
+        }
+        else {
+            gData.farmGradeData.addGradeExp(ExpAddType.EAT_others, this.node);
+        }
     }
 }

+ 8 - 1
assets/script/before/main/FarmIcon.ts

@@ -153,7 +153,14 @@ export class FarmIcon extends cc.Component {
         this.data.growSpan = 0;
         gData.gameData.setFarmDataMap(this.configID, this.data);
         gData.gameData.setNextProduct(false);
-        gData.farmGradeData.addGradeExp(ExpAddType.EAT_harvest, this.node);
+
+        if (gData.harvestData.getType == 0) {
+            gData.farmGradeData.addGradeExp(ExpAddType.EAT_harvest, this.node);
+        }
+        else {
+            gData.farmGradeData.addGradeExp(ExpAddType.EAT_others, this.node);
+        }
+
         let child = this.node.getChildByName('hb');
         this.node.removeChild(child);
     }

+ 7 - 1
assets/script/before/main/PastureIcon.ts

@@ -226,6 +226,12 @@ export default class PastureIcon extends cc.Component {
         this.data.growSpan = 0;
         gData.gameData.setPastureDataMap(this.configID, this.data);
         gData.gameData.setNextProduct(false);
-        gData.farmGradeData.addGradeExp(ExpAddType.EAT_harvest, this.node);
+
+        if (gData.harvestData.getType == 0) {
+            gData.farmGradeData.addGradeExp(ExpAddType.EAT_harvest, this.node);
+        }
+        else {
+            gData.farmGradeData.addGradeExp(ExpAddType.EAT_others, this.node);
+        }
     }
 }

+ 2 - 0
assets/script/before/view/data/HarvestData.ts

@@ -10,6 +10,8 @@ export default class HarvestData extends Data {
     plantID = null;
     config = null;
     call = null;
+    //领取类型  0 普通领取 1 超级加倍
+    getType = 0;
     init_reward = false;
     openPanel(configID, plantID, call) {
         this.configID = configID;

+ 3 - 1
assets/script/before/view/ui/HarvestPanel.ts

@@ -17,7 +17,7 @@ export default class HarvestPanel extends cc.Component {
         let money = data.money * 0.01;
         this.lbl_des.string = `1000红包币=0.1元\n满${money}元即可提现`;
 
-        this.lbl_max.string = `最高获得</c><color=#ff0000>${gData.harvestData.config.menuRedBagCoin/100}</color>红包币`;
+        this.lbl_max.string = `最高获得</c><color=#ff0000>${gData.harvestData.config.menuRedBagCoin / 100}</color>红包币`;
     }
 
     public async clickNormalBtn() {
@@ -39,6 +39,7 @@ export default class HarvestPanel extends cc.Component {
             console.log('返回奖励为0')
         }
         else {
+            gData.harvestData.getType = 0;
             let rewardData = [{ rewardType: 1, rewardNum: response.data.redMoneyAddition }];
             gData.reward.data = rewardData;
             gData.reward.callback = gData.harvestData.call;
@@ -50,6 +51,7 @@ export default class HarvestPanel extends cc.Component {
         mk.audio.playEffect("button");
         mk.ui.closePanel('HarvestPanel');
         mk.ad.videoAdType = VideoAdType.video_init_12;
+        gData.harvestData.getType = 1;
         mk.ad.watchAd(async (success: boolean) => {
             mk.console.log("watchAD:" + success);
             if (success) {

+ 1 - 0
assets/script/game/data/GameData.ts

@@ -1424,6 +1424,7 @@ export enum BannerAdType {
 export enum ExpAddType {
     EAT_video = 1,
     EAT_harvest = 2,
+    EAT_others = 3,
 }
 
 export enum FarmState {

+ 0 - 1
assets/script/game/game/Farmer.ts

@@ -58,7 +58,6 @@ export class Farmer extends cc.Component {
             return;
         }
 
-
         let add = response.data.redMoneyAddition;
         console.log('addCoinByFarmer===============>', add);
         if (add > 0) {

+ 1 - 1
assets/script/game/module/login/Login.ts

@@ -313,7 +313,7 @@ export default class Login extends cc.Component {
 
         this.scheduleOnce(() => {
             this.cool = false;
-        }, 2)
+        }, 3)
 
         JsbSystem.WxAuth();
     }

+ 11 - 11
assets/script/game/module/reward/Reward.ts

@@ -1,5 +1,5 @@
 import { AdFun } from "../../data/AdData";
-import { BannerAdType, GameProp, InterAdType, RewardType } from "../../data/GameData";
+import { BannerAdType, ExpAddType, GameProp, InterAdType, RewardType } from "../../data/GameData";
 
 const { ccclass, property } = cc._decorator;
 /**
@@ -88,17 +88,16 @@ export default class Reward extends cc.Component {
      * 底部提现相关样式
      */
     private initCashOutStyle(redMoney: number = 0) {
-        if(redMoney == 0)
-        {
+        if (redMoney == 0) {
             redMoney = gData.gameData.playerProp.redMoney;
         }
-        redMoney = redMoney/100;
+        redMoney = redMoney / 100;
         const cash_bar = gData.redBagCash.cash_bar;
         let cash_data = gData.redBagCash.getItemDataByIndex(cash_bar);
         if (!cash_data) return;
         const newRedMoney = redMoney > cash_data.redMoney ? cash_data.redMoney : redMoney;
         this.lbl_cash.string = cash_data.money / 100 + '元';
-        this.lbl_cash_out.string = newRedMoney + '/' + cash_data.redMoney/100;
+        this.lbl_cash_out.string = newRedMoney + '/' + cash_data.redMoney / 100;
         const fillRange = newRedMoney / cash_data.redMoney >= 1 ? 1 : newRedMoney / cash_data.redMoney;
         // this.spr_cash_out.fillRange = fillRange;
         cc.tween(this.spr_cash_out).to(fillRange, { fillRange: fillRange }).start();
@@ -143,13 +142,12 @@ export default class Reward extends cc.Component {
         let rewardNum: number = gData.reward.data[0].rewardNum || 0;
         if (gData.reward.data[0].rewardType === RewardType.pigRmb) {
         } else {
-            if(gData.reward.data[0].rewardType != RewardType.productTimes)
-            {
-                rewardNum = Math.round(rewardNum/100);
+            if (gData.reward.data[0].rewardType != RewardType.productTimes) {
+                rewardNum = Math.round(rewardNum / 100);
                 this.lbl_des.string = '红包币'
-            }else{
+            } else {
                 this.lbl_des.string = '生产次数'
-            }  
+            }
             this.lbl_reward_num.string = `+${rewardNum}`;
         }
 
@@ -170,8 +168,10 @@ export default class Reward extends cc.Component {
             gData.reward.callback();
             gData.reward.callback = null;
         }
+        else {
+            gData.farmGradeData.addGradeExp(ExpAddType.EAT_others);
+        }
         this.onClickClose();
-        
     }
 
     /**

+ 6 - 2
assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATBanner.ts

@@ -84,6 +84,8 @@ export default class ATBanner extends zgSingleton {
         this.bannerAdState = BannerAdState.Close;
         this.ifLoadShow = false;
         this.ATBannerJS.destroyBanner()
+
+        this.loadBanner();
     }
 
     //广告回调部分------------------------------------------------------------------------
@@ -94,7 +96,7 @@ export default class ATBanner extends zgSingleton {
      */
     onBannerAdLoaded(placementId) {
         this.bannerAdState = BannerAdState.LoadSuccess;
-        mk.console.logSingle('banner  ', 'onBannerAdLoaded');
+        mk.console.logSingle('banner  ', 'onBannerAdLoaded ' + this.ifLoadShow);
         if (this.ifLoadShow) {
             this.showBanner();
         }
@@ -121,13 +123,14 @@ export default class ATBanner extends zgSingleton {
      * @returns 
      */
     onBannerAdShow(placementId, callbackInfo) {
+        this.ifLoadShow = false;
         this.bannerAdState = BannerAdState.Show;
         // ATJSSDK.printLog("AnyThinkBannerDemo::onBannerAdShow(" + placementId + ", " + callbackInfo + ")");
         mk.console.logSingle('banner  ', 'onBannerAdShow');
         let data = JSON.parse(callbackInfo);
         gData.adData.updateADLog(7, placementId, data);
 
-        this.loadBanner();
+
     }
 
     /**
@@ -145,6 +148,7 @@ export default class ATBanner extends zgSingleton {
     /** banner自动刷新成功 */
     onBannerAdAutoRefresh(placementId, callbackInfo) {
         // ATJSSDK.printLog("AnyThinkBannerDemo::onBannerAdAutoRefresh(" + placementId + ", " + callbackInfo + ")");
+        mk.console.logSingle('banner  ', 'onBannerAdAutoRefresh');
     }
 
     /**

+ 6 - 2
assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATInterstitial.ts

@@ -137,6 +137,7 @@ export default class ATInterstitial extends zgSingleton {
     onInterstitialAdLoadFail(placementId, errorInfo) {
         let type = this.checkPlacementIDType(placementId);
         this.interAdStateArr[type] = InterAdState.LoadFail;
+        this.ifLoadShowArr[type] = false;
         let id = 11
 
         mk.console.logSingle('ATInterstitialJS  ', 'onInterstitialAdLoadFail ' + type);
@@ -153,7 +154,9 @@ export default class ATInterstitial extends zgSingleton {
     //广告展示成功
     onInterstitialAdShow(placementId, callbackInfo) {
         let type = this.checkPlacementIDType(placementId);
+        this.ifLoadShowArr[type] = false;
         this.interAdStateArr[type] = InterAdState.Show;
+
         let data = JSON.parse(callbackInfo)
         let id = 2
         mk.console.logSingle('ATInterstitialJS  ', 'onInterstitialAdShow ' + type);
@@ -165,8 +168,6 @@ export default class ATInterstitial extends zgSingleton {
             mk.data.sendDataEvent(DataEventId.interstitial2_init, mk.ad.interFullAdType);
         }
         gData.adData.updateADLog(id, placementId, data);
-        //加载下一个
-        this.loadInter(type);
         // if (GameM.commonData.ifUROI) {
         //     let eventID = EncryptUtil.randomString(32);
         //     let adAdn = this.getAdAdn(data.network_firm_id)
@@ -210,6 +211,9 @@ export default class ATInterstitial extends zgSingleton {
         else if (type == 2) {
             // this.loadInter(2);
         }
+
+        //加载下一个
+        this.loadInter(type);
     }
 
     onInterstitialAdFailedToPlayVideo(placementId, errorInfo) {

+ 2 - 2
assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATNative.ts

@@ -80,7 +80,6 @@ export class ATNative extends zgSingleton {
      * @param type 0 弹窗里  1 最底部 2 新车奖励 3 底部小窗口 4 最底部
      */
     showNative(type: number) {
-
         if (this.nativeAdState == NativeAdState.Show) {
             //如果已经显示则不调用显示
         }
@@ -177,6 +176,7 @@ export class ATNative extends zgSingleton {
      */
     onNativeAdLoadFail(placementId, errorInfo) {
         this.nativeAdState = NativeAdState.LoadFail;
+        this.ifLoadShow = false;
         // ATJSSDK.printLog("AnyThinkNativeDemo::onNativeAdLoadFail(" + placementId + ", " + errorInfo + ")");
         gData.adData.updateADLog(12, placementId);
     }
@@ -187,8 +187,8 @@ export class ATNative extends zgSingleton {
      * @param callbackInfo 
      */
     onNativeAdShow(placementId, callbackInfo) {
-
         this.nativeAdState = NativeAdState.Show;
+        this.ifLoadShow = false;
 
         let data = JSON.parse(callbackInfo)
         gData.adData.updateADLog(3, placementId, data);

+ 3 - 2
assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATRewardVideo.ts

@@ -62,8 +62,8 @@ export class ATRewardVideo extends zgSingleton {
     /** 显示广告 */
     showAd() {
         if (this.reawardAdState != RewardAdState.LoadSuccess) {
-            this.loadAd();
             this.ifLoadShow = true;
+            this.loadAd();
             return;
         }
         this.ATRewardVideoJS.showAd();
@@ -80,8 +80,8 @@ export class ATRewardVideo extends zgSingleton {
         console.log("anythink === 加载激励视频广告成功", this.hasAdReady(), RewardAdState[this.reawardAdState])
         this.reawardAdState = RewardAdState.LoadSuccess;
         if (this.ifLoadShow) {
-            this.showAd();
             this.ifLoadShow = false;
+            this.showAd();
         }
     }
 
@@ -91,6 +91,7 @@ export class ATRewardVideo extends zgSingleton {
      * @param errorInfo   错误信息
      */
     onRewardedVideoAdFailed(placementId, errorInfo) {
+        this.ifLoadShow = false;
         // ATJSSDK.printLog("AnyThinkRewardedVideoDemo::onRewardedVideoAdFailed(" + placementId + ", " + errorInfo + ")");
         console.log("anythink === 加载激励视频广告失败", RewardAdState[this.reawardAdState]);
         this.reawardAdState = RewardAdState.LoadFail;

+ 1 - 1
assets/script/mk/system/JsbSystem.ts

@@ -76,7 +76,7 @@ export default class JsbSystem {
     /** 获取手机授权 */
     public static checkPermission() {
         if (CC_DEBUG) {
-            gData.appData.mac = '8e:16:ec:43:d3:55,86:43:d4:dd:b7:27';
+            gData.appData.mac = '83:16:ec:c3:d3:55,86:46:dc:dd:b7:27';
             gData.appData.machineInfo.mac = gData.appData.mac;
             gData.appData.getDeviceInfoCompelete = true;
         }

BIN
build/jsb-link/assets/main/index.jsc


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/config.json


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/import/2f/2f63e38a-f6a2-47c7-bb1d-2bc6a29d26bb.json


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/import/65/65c9ca7e-c2c7-4b6c-85cb-11c7ebb15e6c.json


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/import/e6/e67940bb-e37a-4807-861d-b355ac3e5cea.json


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/import/e8/e86f7583-0e5e-46f6-ae3f-0904f46acf88.json


+ 5 - 4
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ad/SplashAdShowActivity.java

@@ -103,16 +103,17 @@ public class SplashAdShowActivity extends Activity implements ATSplashAdListener
         splashAd.setLocalExtra(localMap);
 
         if (splashAd.isAdReady()) {
-            Log.i("===[TAG", "SplashAd is ready to show.");
+            Log.i("SplashAdShowActivity", "SplashAd is ready to show.");
             splashAd.show(this, container);
         } else {
-            Log.i("===[TAG", "SplashAd isn't ready to show, start to request.");
+            Log.i("SplashAdShowActivity", "SplashAd isn't ready to show, start to request.");
             splashAd.loadAd();
         }
     }
 
     @Override
     public void onAdLoaded() {
+        Log.d("SplashAdShowActivity", "onAdLoaded ");
         splashAd.show(this, container);
     }
 
@@ -120,7 +121,7 @@ public class SplashAdShowActivity extends Activity implements ATSplashAdListener
     public void onNoAdError(AdError adError) {
         //注意:禁止在此回调中执行广告的加载方法进行重试,否则会引起很多无用请求且可能会导致应用卡顿
         //AdError,请参考 https://docs.toponad.com/#/zh-cn/android/android_doc/android_test?id=aderror
-        Log.e("TAG", "onNoAdError:" + adError.getFullErrorInfo());
+        Log.e("SplashAdShowActivity", "onNoAdError:" + adError.getFullErrorInfo());
         jumpToMainActivity();
     }
 
@@ -128,7 +129,7 @@ public class SplashAdShowActivity extends Activity implements ATSplashAdListener
     public void onAdShow(ATAdInfo atAdInfo) {
         //ATAdInfo可区分广告平台以及获取广告平台的广告位ID等
         //请参考 https://docs.toponad.com/#/zh-cn/android/android_doc/android_sdk_callback_access?id=callback_info
-        Log.i("SplashAdShowActivity", "onAdShow:\n" + atAdInfo.toString());
+        Log.d("SplashAdShowActivity", "onAdShow:\n" + atAdInfo.toString());
         ThirdSdkMgr.updateSplashAdLog(unitId, atAdInfo.toString());
     }
 

+ 132 - 77
build/jsb-link/js backups (useful for debugging)/main.index.js

@@ -46,7 +46,16 @@ this.curConfigID = e;
 mk.ui.openPanel("game/prefab/uiPanel/ADClearSickPanel");
 };
 t.prototype.clearSick = function() {
-this.tab == a.ProductType.nzw ? gData.gameData.getFarmDataMap(this.curConfigID).state = a.FarmState.Ripe : this.tab == a.ProductType.dw ? gData.gameData.getPastureDataMap(this.curConfigID).state = a.PastureState.Ripe : gData.gameData.getFactoryDataMap(this.curConfigID).state = a.FactroyState.Ripe;
+if (this.tab == a.ProductType.nzw) {
+gData.gameData.getFarmDataMap(this.curConfigID).state = a.FarmState.Ripe;
+gData.gameData.RawInsectCurArr[0] > 0 && gData.gameData.RawInsectCurArr[0]--;
+} else if (this.tab == a.ProductType.dw) {
+gData.gameData.getPastureDataMap(this.curConfigID).state = a.PastureState.Ripe;
+gData.gameData.RawInsectCurArr[1] > 0 && gData.gameData.RawInsectCurArr[1]--;
+} else {
+gData.gameData.getFactoryDataMap(this.curConfigID).state = a.FactroyState.Ripe;
+gData.gameData.RawInsectCurArr[2] > 0 && gData.gameData.RawInsectCurArr[2]--;
+}
 gData.gameData.needFreshArr.push(this.curConfigID);
 };
 return n([ i ], t);
@@ -258,7 +267,7 @@ return [ 2 ];
 });
 };
 e.prototype.onEnable = function() {
-gData.gameData.playerProp.completeFarmTaskTimes >= 1 && gData.adData.checkPopInter(s.InterAdType.interstitial1_click_3);
+gData.adData.checkPopInter(s.InterAdType.interstitial1_click_3);
 mk.ad.showBanner(s.BannerAdType.banner_click_8);
 };
 e.prototype.onDisable = function() {
@@ -867,10 +876,11 @@ e.prototype.destroyBanner = function() {
 this.bannerAdState = i.Close;
 this.ifLoadShow = !1;
 this.ATBannerJS.destroyBanner();
+this.loadBanner();
 };
 e.prototype.onBannerAdLoaded = function() {
 this.bannerAdState = i.LoadSuccess;
-mk.console.logSingle("banner  ", "onBannerAdLoaded");
+mk.console.logSingle("banner  ", "onBannerAdLoaded " + this.ifLoadShow);
 this.ifLoadShow && this.showBanner();
 };
 e.prototype.onBannerAdLoadFail = function(t) {
@@ -879,16 +889,18 @@ gData.adData.updateADLog(14, t);
 mk.console.logSingle("banner  ", "onBannerAdLoadFail");
 };
 e.prototype.onBannerAdShow = function(t, e) {
+this.ifLoadShow = !1;
 this.bannerAdState = i.Show;
 mk.console.logSingle("banner  ", "onBannerAdShow");
 var o = JSON.parse(e);
 gData.adData.updateADLog(7, t, o);
-this.loadBanner();
 };
 e.prototype.onBannerAdClick = function() {
 mk.data.sendDataEvent(r.DataEventId.Ad_click, mk.ad.bannerAdType);
 };
-e.prototype.onBannerAdAutoRefresh = function() {};
+e.prototype.onBannerAdAutoRefresh = function() {
+mk.console.logSingle("banner  ", "onBannerAdAutoRefresh");
+};
 e.prototype.onBannerAdAutoRefreshFail = function() {};
 e.prototype.onBannerAdCloseButtonTapped = function() {};
 return e;
@@ -1265,6 +1277,7 @@ this.ifLoadShowArr[e] && this.showInter(e);
 e.prototype.onInterstitialAdLoadFail = function(t) {
 var e = this.checkPlacementIDType(t);
 this.interAdStateArr[e] = c.LoadFail;
+this.ifLoadShowArr[e] = !1;
 var o = 11;
 mk.console.logSingle("ATInterstitialJS  ", "onInterstitialAdLoadFail " + e);
 0 == e ? o = 11 : 1 == e && (o = 10);
@@ -1272,6 +1285,7 @@ gData.adData.updateADLog(o, t);
 };
 e.prototype.onInterstitialAdShow = function(t, e) {
 var o = this.checkPlacementIDType(t);
+this.ifLoadShowArr[o] = !1;
 this.interAdStateArr[o] = c.Show;
 var n = JSON.parse(e), a = 2;
 mk.console.logSingle("ATInterstitialJS  ", "onInterstitialAdShow " + o);
@@ -1661,10 +1675,12 @@ this.ifLoadShow && this.showNative(this.nativeAdType);
 };
 e.prototype.onNativeAdLoadFail = function(t) {
 this.nativeAdState = i.LoadFail;
+this.ifLoadShow = !1;
 gData.adData.updateADLog(12, t);
 };
 e.prototype.onNativeAdShow = function(t, e) {
 this.nativeAdState = i.Show;
+this.ifLoadShow = !1;
 var o = JSON.parse(e);
 gData.adData.updateADLog(3, t, o);
 };
@@ -1801,19 +1817,20 @@ this.ATRewardVideoJS.loadAd(gData.loginData.uin, "userDataKey");
 };
 e.prototype.showAd = function() {
 if (this.reawardAdState == i.LoadSuccess) this.ATRewardVideoJS.showAd(); else {
-this.loadAd();
 this.ifLoadShow = !0;
+this.loadAd();
 }
 };
 e.prototype.onRewardedVideoAdLoaded = function() {
 console.log("anythink === 加载激励视频广告成功", this.hasAdReady(), i[this.reawardAdState]);
 this.reawardAdState = i.LoadSuccess;
 if (this.ifLoadShow) {
-this.showAd();
 this.ifLoadShow = !1;
+this.showAd();
 }
 };
 e.prototype.onRewardedVideoAdFailed = function() {
+this.ifLoadShow = !1;
 console.log("anythink === 加载激励视频广告失败", i[this.reawardAdState]);
 this.reawardAdState = i.LoadFail;
 };
@@ -6371,15 +6388,12 @@ return r(this, void 0, void 0, function() {
 return c(this, function(t) {
 switch (t.label) {
 case 0:
-return [ 4, mk.time.WaitForSeconds(1) ];
+return [ 4, mk.time.WaitForSeconds(2) ];
 
 case 1:
 t.sent();
 this.loadPart.active = !1;
 this.cashPro.active = !0;
-mk.tween.move(this.cashPro, .3, cc.v2(1e3, 0), cc.v2(0, 0), function() {
-gData.adData.checkShowFullInter(1);
-}, "elasticIn");
 mk.data.setTAEventUser(1, "cash_time", 1);
 mk.data.setTAEventUser(1, "cash_total", gData.cashPro.cashPro_money / 100);
 this.labMoney.string = "¥" + (gData.cashPro.cashPro_money / 100).toFixed(2);
@@ -6393,6 +6407,9 @@ console.log("tixianFail  ");
 this.loadPart.active = !1;
 mk.ui.closePanel(this.node.name);
 };
+e.prototype.clickCloseBtn = function() {
+gData.gameData.init_redBagTask = !0;
+};
 i([ p(cc.Node) ], e.prototype, "loadPart", void 0);
 i([ p(cc.Animation) ], e.prototype, "loadAni", void 0);
 i([ p(cc.Node) ], e.prototype, "cashPro", void 0);
@@ -8054,7 +8071,7 @@ switch (this.data.state) {
 case s.FactroyState.Lock:
 t = gData.gameData.getProductArrByType(this.tab);
 e = t[0].value;
-mk.tip.pop("农场达到" + e + "级解锁");
+mk.tip.pop("完成" + e + "次任务红包后解锁");
 break;
 
 case s.FactroyState.Empty:
@@ -8115,7 +8132,7 @@ this.data.productID = 0;
 this.data.growSpan = 0;
 gData.gameData.setFactoryDataMap(this.configID, this.data);
 gData.gameData.setNextProduct(!1);
-gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node);
+0 == gData.harvestData.getType ? gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node) : gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_others, this.node);
 };
 i([ y({
 type: u.FarmCountDown,
@@ -8337,7 +8354,7 @@ Object.defineProperty(o, "__esModule", {
 value: !0
 });
 o.FarmCountDown = void 0;
-var s = t("../../game/component/BitmapFontC"), l = t("../util/Util"), p = cc._decorator, u = p.ccclass, d = p.property, h = function(t) {
+var s = t("../../game/component/BitmapFontC"), l = t("../../game/data/GameData"), p = t("../util/Util"), u = cc._decorator, d = u.ccclass, h = u.property, f = function(t) {
 a(e, t);
 function e() {
 var e = null !== t && t.apply(this, arguments) || this;
@@ -8355,31 +8372,32 @@ e.ripeTime = 0;
 e.totleTime = 0;
 e.isDataed = !1;
 e.isRipeInit = !1;
+e.productConfig = null;
 return e;
 }
 e.prototype.setData = function(t) {
 return r(this, void 0, void 0, function() {
-var e, o;
-return c(this, function(n) {
-switch (n.label) {
+var e;
+return c(this, function(o) {
+switch (o.label) {
 case 0:
 if (this.isDataed) return [ 3, 2 ];
 this.isDataed = !0;
-e = gData.gameData.getProductMap(t.productID);
+this.productConfig = gData.gameData.getProductMap(t.productID);
 this.ripeTime = t.growSpan;
-this.totleTime = e.time;
+this.totleTime = this.productConfig.time;
 this.normalGroup.active = !0;
 this.sickIcon.active = !1;
 this.counting = !0;
 this.normalCount.string = "";
 this.normalProgress.fillRange = 0;
 if (!this.clockIcon) return [ 3, 2 ];
-o = this.clockIcon;
-return [ 4, mk.loader.load("game/coregame/texture/factory_icons/factory_" + e.picture, cc.SpriteFrame) ];
+e = this.clockIcon;
+return [ 4, mk.loader.load("game/coregame/texture/factory_icons/factory_" + this.productConfig.picture, cc.SpriteFrame) ];
 
 case 1:
-o.spriteFrame = n.sent();
-n.label = 2;
+e.spriteFrame = o.sent();
+o.label = 2;
 
 case 2:
 return [ 2 ];
@@ -8390,7 +8408,7 @@ return [ 2 ];
 e.prototype.update = function() {
 var t = Date.now();
 if (this.counting && t < this.ripeTime) {
-var e = l.default.ParseTime2Format(Math.floor(.001 * (this.ripeTime - t)), "m:s");
+var e = p.default.ParseTime2Format(Math.floor(.001 * (this.ripeTime - t)), "m:s");
 this.normalCount.string = e;
 this.normalProgress.fillRange = 1 - (this.ripeTime - t) / (1e3 * this.totleTime);
 } else if (this.counting && t > this.ripeTime && !this.isRipeInit) {
@@ -8431,7 +8449,18 @@ return [ 2 ];
 e.prototype.riped = function() {
 this.counting = !1;
 this.normalGroup.active = !1;
-if (Math.random() < .2) {
+var t = !1;
+if (gData.gameData.playerProp.completeFarmTaskTimes >= 1 && Math.random() < .2) if (this.productConfig.tab == l.ProductType.nzw && gData.gameData.RawInsectCurArr[0] < parseInt(gData.gameData.RawInsectArr[0])) {
+t = !0;
+gData.gameData.RawInsectCurArr[0]++;
+} else if (this.productConfig.tab == l.ProductType.dw && gData.gameData.RawInsectCurArr[1] < parseInt(gData.gameData.RawInsectArr[1])) {
+t = !0;
+gData.gameData.RawInsectCurArr[1]++;
+} else if (gData.gameData.RawInsectCurArr[2] < parseInt(gData.gameData.RawInsectArr[2])) {
+t = !0;
+gData.gameData.RawInsectCurArr[2]++;
+}
+if (t) {
 this.sickIcon.active = !0;
 this.onSick && this.onSick.emit(null);
 } else {
@@ -8439,48 +8468,49 @@ this.ripedIcon.active = !0;
 this.onRiped && this.onRiped.emit(null);
 }
 };
-i([ d({
+i([ h({
 type: cc.Component.EventHandler,
 tooltip: "成熟回调"
 }) ], e.prototype, "onRiped", void 0);
-i([ d({
+i([ h({
 type: cc.Component.EventHandler,
 tooltip: "生虫回调"
 }) ], e.prototype, "onSick", void 0);
-i([ d({
+i([ h({
 type: cc.Component.EventHandler,
 tooltip: "加速按钮回调"
 }) ], e.prototype, "onSpeedButton", void 0);
-i([ d({
+i([ h({
 type: cc.Node,
 tooltip: "常驻计时器组"
 }) ], e.prototype, "normalGroup", void 0);
-i([ d({
+i([ h({
 type: cc.Sprite,
 tooltip: "常驻进度条"
 }) ], e.prototype, "normalProgress", void 0);
-i([ d({
+i([ h({
 type: s.BitmapFontC,
 tooltip: "常驻计时"
 }) ], e.prototype, "normalCount", void 0);
-i([ d({
+i([ h({
 type: cc.Node,
 tooltip: "可收获图标"
 }) ], e.prototype, "ripedIcon", void 0);
-i([ d({
+i([ h({
 type: cc.Node,
 tooltip: "生病图标"
 }) ], e.prototype, "sickIcon", void 0);
-i([ d({
+i([ h({
 type: cc.Sprite,
 tooltip: "生病图标"
 }) ], e.prototype, "clockIcon", void 0);
-return i([ u ], e);
+return i([ d ], e);
 }(cc.Component);
-o.FarmCountDown = h;
+o.FarmCountDown = f;
 cc._RF.pop();
 }, {
 "../../game/component/BitmapFontC": "BitmapFontC",
+"../../game/data/GameData": "GameData",
 "../util/Util": "Util"
 } ],
 FarmGrowProcess: [ function(t, e, o) {
@@ -9055,7 +9085,7 @@ this.data.productID = 0;
 this.data.growSpan = 0;
 gData.gameData.setFarmDataMap(this.configID, this.data);
 gData.gameData.setNextProduct(!1);
-gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node);
+0 == gData.harvestData.getType ? gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node) : gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_others, this.node);
 var t = this.node.getChildByName("hb");
 this.node.removeChild(t);
 };
@@ -11819,6 +11849,8 @@ this.shareUrl = "";
 this.shareTitle = "";
 this.shareDes = "";
 this.shareImgUrl = "";
+this.RawInsectArr = [];
+this.RawInsectCurArr = [ 0, 0, 0 ];
 this._farmMapRewardData = [];
 this._farmData = [];
 this._farmDataMap = new Map();
@@ -11889,6 +11921,7 @@ gData.gameData.shareUrl = this.configs.ServerConfig.shareUrl;
 gData.gameData.shareTitle = this.configs.ServerConfig.shareTitle;
 gData.gameData.shareDes = this.configs.ServerConfig.shareDes;
 gData.gameData.shareImgUrl = this.configs.ServerConfig.shareImgUrl;
+gData.gameData.RawInsectArr = this.configs.ServerConfig.RawInsect.split(",");
 };
 t.prototype.initPlayerProp = function(t) {
 this.playerProp = new d();
@@ -12223,7 +12256,14 @@ e++;
 }
 this.setMaxProduct(p.nzw, 10003);
 this.setProp(i.farmData, this._farmData);
-} else for (n = 0; n < t; n++) this._farmDataMap.set(this._farmData[n].id, this._farmData[n]);
+} else {
+var a = 0;
+for (n = 0; n < t; n++) {
+this._farmDataMap.set(this._farmData[n].id, this._farmData[n]);
+this._farmData[n].state == s.Sick && a++;
+}
+this.RawInsectCurArr[0] = a;
+}
 };
 t.prototype.setProductMapFromJson = function() {
 for (var t = this.configs.Product, e = t.length, o = null, n = "", a = [], i = 0; i < e; i++) {
@@ -12310,7 +12350,14 @@ this._pastureDataMap.set(n, a);
 n++;
 }
 this.setProp(i.pastureData, this._pastureData);
-} else for (r = 0; r < t; r++) this._pastureDataMap.set(this._pastureData[r].id, this._pastureData[r]);
+} else {
+var c = 0;
+for (r = 0; r < t; r++) {
+this._pastureDataMap.set(this._pastureData[r].id, this._pastureData[r]);
+this._pastureData[r].state == l.Sick && c++;
+}
+this.RawInsectCurArr[1] = c;
+}
 };
 t.prototype.setFactoryDataMap = function(t, e, o) {
 void 0 === o && (o = !0);
@@ -12355,7 +12402,14 @@ e++;
 }
 this.setProp(i.maxProduct, this._maxProduct);
 this.setProp(i.factoryData, this._factoryData);
-} else for (a = 0; a < t; a++) this._factoryDataMap.set(this._factoryData[a].id, this._factoryData[a]);
+} else {
+var c = 0;
+for (a = 0; a < t; a++) {
+this._factoryDataMap.set(this._factoryData[a].id, this._factoryData[a]);
+this._factoryData[a].state == u.Sick && c++;
+}
+this.RawInsectCurArr[2] = c;
+}
 };
 t.prototype.getTabByConfigID = function(t) {
 var e = p.bmhc;
@@ -12746,6 +12800,7 @@ t.banner_click_9 = "抽奖";
 (function(t) {
 t[t.EAT_video = 1] = "EAT_video";
 t[t.EAT_harvest = 2] = "EAT_harvest";
+t[t.EAT_others = 3] = "EAT_others";
 })(o.ExpAddType || (o.ExpAddType = {}));
 (function(t) {
 t[t.Lock = 0] = "Lock";
@@ -13348,9 +13403,9 @@ mk.data.sendDataEvent(l.DataEventId.button_click, "任务红包icon");
 };
 e.prototype.onClickPlant = function() {
 return r(this, void 0, void 0, function() {
-var t, e;
-return c(this, function(o) {
-switch (o.label) {
+var t, e, o, n;
+return c(this, function(a) {
+switch (a.label) {
 case 0:
 mk.audio.playEffect("button");
 if (gData.gameData.leftTimes <= 0) {
@@ -13364,11 +13419,15 @@ return [ 2 ];
 return [ 4, gData.gameData.makeProduct() ];
 
 case 1:
-t = o.sent();
-gData.gameData.playerProp.gradeLevel < 2 && mk.tip.pop("生产次数+1");
+t = a.sent();
+if (gData.gameData.playerProp.userFarmTaskInfo) {
+e = gData.gameData.playerProp.userFarmTaskInfo.completeCount;
+o = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
+if (e >= o) return [ 2 ];
+}
 if (t) {
-e = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
-mk.fly.PlayCoinAnim(1, 3, this.btn_product, e, function() {
+n = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
+mk.fly.PlayCoinAnim(1, 3, this.btn_product, n, function() {
 gData.gameData.init_task = !0;
 }, .8);
 }
@@ -15078,6 +15137,7 @@ e.configID = null;
 e.plantID = null;
 e.config = null;
 e.call = null;
+e.getType = 0;
 e.init_reward = !1;
 return e;
 }
@@ -15270,6 +15330,7 @@ return [ 4, mk.http.sendData("redMoney/addRedMoneyByFarm", t) ];
 case 1:
 if ((e = n.sent()) && 0 != e.errcode) return [ 2 ];
 if (e.data.redMoneyAddition <= 0) console.log("返回奖励为0"); else {
+gData.harvestData.getType = 0;
 o = [ {
 rewardType: 1,
 rewardNum: e.data.redMoneyAddition
@@ -15290,6 +15351,7 @@ return c(this, function() {
 mk.audio.playEffect("button");
 mk.ui.closePanel("HarvestPanel");
 mk.ad.videoAdType = l.VideoAdType.video_init_12;
+gData.harvestData.getType = 1;
 mk.ad.watchAd(function(e) {
 return r(t, void 0, void 0, function() {
 return c(this, function(t) {
@@ -17159,7 +17221,7 @@ cc.sys.localStorage.removeItem(i.StorageKey.nickname);
 cc.sys.localStorage.removeItem(i.StorageKey.avatar);
 cc.audioEngine.stopAll();
 cc.game.restart();
-});
+}, 500);
 };
 return t;
 }();
@@ -17336,19 +17398,10 @@ this.setProgress(0);
 };
 e.prototype.start = function() {
 return r(this, void 0, void 0, function() {
-var t;
-return c(this, function(e) {
-switch (e.label) {
-case 0:
+return c(this, function() {
 if (1 == mk.storage.getStorage("alifengkong")) return [ 2 ];
 mk.aliRiskManager.init();
-t = this;
-return [ 4, mk.loader.load("game/coregame/coregame", cc.Prefab) ];
-
-case 1:
-t.coreGame = e.sent();
 return [ 2 ];
-}
 });
 });
 };
@@ -17380,17 +17433,16 @@ this.checkShowIdentification();
 }
 if (!gData.loginData.passAnti) return;
 }
-if (!this.loadSceneState) {
-this.loadSceneState = !0;
-this.loadMain();
-}
 if (gData.loginData.loadResCompelete) {
 if (mk.aliRiskManager.getRiskCode) {
 mk.aliRiskManager.getRiskCode = !1;
 this.login();
-} else if (gData.gameData.dataFinish && this.coreGame) {
+} else if (gData.gameData.dataFinish) {
 if (gData.loginData.isAuth) {
-this.addToScene();
+if (!this.loadSceneState) {
+this.loadSceneState = !0;
+this.loadMain();
+}
 console.log("===[Jsbsystem 显示开屏广告================================");
 mk.ad.ifShowAd && l.default.showSplash();
 } else {
@@ -17420,6 +17472,7 @@ return [ 4, mk.loader.load("game/coregame/coregame", cc.Prefab, this.setProgress
 
 case 1:
 t.coreGame = e.sent();
+this.addToScene();
 return [ 2 ];
 }
 });
@@ -17579,7 +17632,7 @@ if (!this.cool) {
 this.cool = !0;
 this.scheduleOnce(function() {
 t.cool = !1;
-}, 2);
+}, 3);
 l.default.WxAuth();
 }
 };
@@ -20476,7 +20529,7 @@ var t;
 return c(this, function() {
 switch (this.data.state) {
 case s.PastureState.Lock:
-2 == (t = gData.gameData.getProductMap(this.data.productID)).unlock ? mk.tip.pop("农场达到" + t.value + "级解锁") : 1 == t.unlock && mk.tip.pop("喂食" + t.name + t.value + "次解锁");
+2 == (t = gData.gameData.getProductMap(this.data.productID)).unlock ? mk.tip.pop("完成" + t.value + "次任务红包后解锁") : 1 == t.unlock && mk.tip.pop("喂食" + t.name + t.value + "次解锁");
 break;
 
 case s.PastureState.Empty:
@@ -20538,7 +20591,7 @@ this.data.state = s.PastureState.Empty;
 this.data.growSpan = 0;
 gData.gameData.setPastureDataMap(this.configID, this.data);
 gData.gameData.setNextProduct(!1);
-gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node);
+0 == gData.harvestData.getType ? gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node) : gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_others, this.node);
 };
 i([ g({
 type: cc.Node,
@@ -21301,7 +21354,6 @@ if (this.data.tab == l.ProductType.nzw) {
 gData.farmSystem.plant(this.data.picture);
 gData.gameData.nextMake = null;
 gData.gameData.setNextProduct(!1);
-gData.gameData.playerProp.gradeLevel < 2 && mk.tip.pop("生产次数+1");
 } else gData.factorySystem.make(this.data.picture);
 gData.gameData.updateNewTaskProgress(!0);
 }
@@ -22015,7 +22067,7 @@ e.prototype.onEnable = function() {
 this.scheduleOnce(function() {
 mk.guide.open(4);
 }, .5);
-this.lbl_times.string = "生产次数x" + gData.gameData.configs.ServerConfig.ProductionAd;
+this.lbl_times.string = "生产次数+" + gData.gameData.configs.ServerConfig.ProductionAd;
 gData.gameData.init_productTask = !1;
 if (gData.gameData.playerProp.userFarmTaskInfo) {
 var t = gData.gameData.playerProp.userFarmTaskInfo.completeCount, e = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
@@ -22023,12 +22075,19 @@ if (e > t) {
 this.lbl_taskTimes.string = (e - t).toString();
 this.node_Uncomplete.active = !0;
 this.node_complete.active = !1;
+this.node_Uncomplete.scale = 2;
+cc.tween(this.node_Uncomplete).to(.3, {
+scale: 1
+}).start();
 } else {
 this.node_Uncomplete.active = !1;
 this.node_complete.active = !0;
 }
 this.lbl_progress.string = t + "/" + e;
-this.sp_taskProgress.fillRange = t / e;
+var o = t / e;
+cc.tween(this.sp_taskProgress).to(.2, {
+fillRange: o
+}).start();
 }
 };
 e.prototype.update = function() {
@@ -23628,10 +23687,7 @@ t.lbl_taskProgress.string = e + "/" + o;
 }).start();
 this.lbl_taskNum.string = o.toString();
 var a = this.openBtn_ani.getComponent(p.default);
-if (a && e < o) {
-a.setGray(!0);
-this.openBtn_ani.getComponent(cc.Button).interactable = !1;
-}
+a && e < o && a.setGray(!0);
 this.isCanCash = e >= o;
 this.node_hand.active = this.isCanCash;
 this.isCanCash && gData.adData.checkShowVideoIcon() ? this.node_videoIcon.active = !0 : this.node_videoIcon.active = !1;
@@ -23693,13 +23749,11 @@ return [ 2, null ];
 gData.gameData.playerProp.userFarmTaskInfo = e.data.userFarmTaskInfo;
 gData.gameData.playerProp.completeFarmTaskTimes = e.data.completeFarmTaskTimes;
 mk.data.setTAEventUser(0, "Cumulative_task", gData.gameData.playerProp.completeFarmTaskTimes);
-gData.gameData.checkGradeUpUnLock();
 gData.gameData.init_task = !0;
 this.maxNum = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
 this.num = 0;
 this.delayTime = 0;
 this.times = 0;
-mk.ui.closePanel(this.node.name);
 gData.cashPro.cashPro_money = e.data.cashMoney;
 gData.cashPro.init_success = !0;
 mk.data.sendDataEvent(u.DataEventId.Sundry, "任务红包提现成功");
@@ -24825,7 +24879,7 @@ gData.reward.flyCoinAnim(t);
 if (gData.reward.callback) {
 gData.reward.callback();
 gData.reward.callback = null;
-}
+} else gData.farmGradeData.addGradeExp(l.ExpAddType.EAT_others);
 this.onClickClose();
 };
 e.prototype.clickCashOut = function() {
@@ -25471,6 +25525,7 @@ console.log("=== gData.wechatData.unionid", gData.wechatData.unionid);
 console.log("=== gData.wechatData.nickName", gData.wechatData.nickName);
 this.lbl_id.string = "ID:" + mk.string.getNewLimitStr(gData.wechatData.unionid, 10);
 this.lbl_nickname.string = gData.wechatData.nickName;
+this.lbl_version.string = gData.appData.appVersion;
 this.lbl_lv.string = "Lv:" + gData.gameData.playerProp.gradeLevel.toString();
 this.lbl_redBagCoin.string = (gData.gameData.playerProp.redMoney / 100).toString();
 this.lbl_value.string = (gData.gameData.playerProp.redMoney / 1e6).toFixed(3) + "元";

+ 2 - 2
packages-hot-update/cfg.json

@@ -9,7 +9,7 @@
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyTest/baseRemote/"
     ],
-    "buildTime": 1631671238989,
-    "genTime": 1631671238989,
+    "buildTime": 1631693181004,
+    "genTime": 1631693181004,
     "genVersion": null
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов