wuwangdong 4 年之前
父节点
当前提交
a6fa0ee2de

+ 8 - 8
assets/resources/module/blessingBag/blessingBagItem.prefab

@@ -630,7 +630,7 @@
     "asset": {
       "__uuid__": "3c12cc7b-777b-45f9-8bf1-8a285075e6f7"
     },
-    "fileId": "70Q87myRtPEJZcfeQv5yrH",
+    "fileId": "b3qRoyAbhPboK0tziJIeEe",
     "sync": false
   },
   {
@@ -739,7 +739,7 @@
     "asset": {
       "__uuid__": "3c12cc7b-777b-45f9-8bf1-8a285075e6f7"
     },
-    "fileId": "7bcKZ0oQdCYLMeSgtF8psp",
+    "fileId": "98k+IFeeFFw5vGakbtUGmd",
     "sync": false
   },
   {
@@ -2231,15 +2231,15 @@
     "_opacity": 255,
     "_color": {
       "__type__": "cc.Color",
-      "r": 237,
-      "g": 13,
-      "b": 63,
+      "r": 249,
+      "g": 11,
+      "b": 187,
       "a": 255
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 36.2,
-      "height": 39.8
+      "width": 34.2,
+      "height": 37.8
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2315,7 +2315,7 @@
     "node": {
       "__id__": 61
     },
-    "_enabled": true,
+    "_enabled": false,
     "_color": {
       "__type__": "cc.Color",
       "r": 255,

文件差异内容过多而无法显示
+ 493 - 94
assets/resources/module/farmMap/farmMap.prefab


+ 2 - 0
assets/script/before/view/uiItem/PlantItem.ts

@@ -122,6 +122,8 @@ export default class PlantItem extends cc.Component {
             gData.factorySystem.make(this.data.picture);
         }
         gData.gameData.updateNewTaskProgress(true);
+
+        gData.gameData.gameStyle.dpFlyRedAni();
     }
 
     getDesByType() {

+ 3 - 3
assets/script/game/data/GameData.ts

@@ -535,9 +535,9 @@ export class GameData {
             mk.ui.closeAllUI();
             mk.guide.open(5);
         }
-        if (isNeedRefresh) {
-            gData.gameData.init_task = true;
-        }
+        // if (isNeedRefresh) {
+        //     gData.gameData.init_task = true;
+        // }
         return true;
     }
 

+ 1 - 0
assets/script/game/data/module/BlessingBagData.ts

@@ -75,6 +75,7 @@ export class BlessingBagData extends Data {
 
         this.isPlayAniUpdate = true;
         this.videoRbData = response.data.userWelFareTaskInfo;
+        mk.tip.pop('已增加所有的提现进度');
     }
 
     /**

+ 2 - 0
assets/script/game/data/module/WalletCashOutData.ts

@@ -65,8 +65,10 @@ export class WalletCashOutData extends Data {
         if (cashData) {
             gData.gameData.playerProp.redMoney -= cashData[id - 1].redMoney;
 
+            console.log(`-----------------1===>${id}====${cashData.length}`);
             gData.cashPro.cashPro_money = cashData[id - 1].money;
             gData.cashPro.init_success = true;
+            console.log('-----------------2');
             // gData.receiptNotice.receip_rmb = cashData[id - 1].money;
             // mk.ui.openPanel('module/newNotice/newNotice');
         }

+ 14 - 0
assets/script/game/game/Game.ts

@@ -438,11 +438,25 @@ export default class Game extends cc.Component {
 
         if (flyRed) {
             //mk.audio.playEffect('redmoney');
+            this.dpFlyRedAni();
+        }
+    }
+
+    public dpFlyRedAni(starPos: cc.Vec2 = null)
+    {
+        if(starPos)
+        {
+            let pos = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
+            mk.fly.PlayCoinAnim(1, 5, starPos, pos, () => {
+                gData.gameData.init_task = true;
+            }, 0.8);
+        }else{
             let pos = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
             mk.fly.PlayCoinAnim(1, 5, this.btn_product, pos, () => {
                 gData.gameData.init_task = true;
             }, 0.8);
         }
+       
     }
 
 

+ 2 - 2
assets/script/game/module/blessingBag/BlessingBagItem.ts

@@ -124,7 +124,7 @@ export default class BlessingBagItem extends cc.Component {
                 this.curValue += this.delta * dt;
                 if (this.curValue >= this.data.progressRate * 100) {
                     this.isPlayAni = false;
-                    this.doAni();
+                    //this.doAni();
                     this.curValue = this.data.progressRate * 100;
                     this.lastNum = this.data.progressRate * 100;
                 }
@@ -133,7 +133,7 @@ export default class BlessingBagItem extends cc.Component {
                 //}
             } else {
                 this.isPlayAni = false;
-                this.doAni();
+                //this.doAni();
                 this.curTime = this.totalTime;
                 //this.unschedule(this.UpdateAni);
                 this.curValue = this.data.progressRate * 100;

+ 2 - 2
assets/script/game/module/farmMap/FarmMap.ts

@@ -72,11 +72,11 @@ export default class FarmMap extends cc.Component {
                         }
                     }
                 }
-                this.itemName[index].setShowUIState(false, isShowRed);
+                this.itemName[index].setShowUIState(false, isShowRed, ProductType[key]);
 
             } else {
                 this.itemName[index].toggle.interactable = false;
-                this.itemName[index].setShowUIState(true, false);
+                this.itemName[index].setShowUIState(true, false, ProductType[key]);
             }
             ++index;
         }

+ 18 - 1
assets/script/game/module/farmMap/ItemName.ts

@@ -1,3 +1,4 @@
+import { ProductType } from "../../data/GameData";
 
 const { ccclass, property } = cc._decorator;
 @ccclass
@@ -15,6 +16,11 @@ export default class ItemName extends cc.Component{
     @property({displayName: '红点', type: cc.Node})
     public node_redPoint: cc.Node = null;
 
+    @property({displayName: '按钮', type: cc.Button})
+    public btn_luck: cc.Button = null;
+
+    pt:ProductType = ProductType.nzw;
+
     start(){
 
 
@@ -25,9 +31,20 @@ export default class ItemName extends cc.Component{
 
     }
 
-    setShowUIState(luck: boolean, showRedPoint: boolean)
+    setShowUIState(luck: boolean, showRedPoint: boolean, id: ProductType)
     {
         this.sp_luck.active = luck;
+        this.btn_luck.node.active = luck;
         this.node_redPoint.active = showRedPoint;
+        this.pt = id;
+    }
+
+    clickLuckBtn()
+    {
+        let data = gData.gameData.getProductArrByType(this.pt);
+        if(data && data.length> 0 && data[0].unlock == 2)
+        {
+            mk.tip.pop(`完成${data[0].value}次任务红包后解锁`);
+        }
     }
 }

+ 9 - 7
assets/script/game/module/newCashUI/WalletCashOut.ts

@@ -82,9 +82,9 @@ export default class WalletCashOut extends cc.Component {
             this.lbl_cashOut.string = `满${this.intV}元提现`;
 
             if (data.progressRate >= 1) {
-                this.btn_addProgress.setGray(true);
+                this.btn_addProgress.setGray(true, true);
             } else {
-                this.btn_addProgress.setGray(false);
+                this.btn_addProgress.setGray(false, true);
             }
         }
     }
@@ -134,10 +134,10 @@ export default class WalletCashOut extends cc.Component {
             if (isEnough >= 0) {
                 if (this.curChooseIndex != -1) {
                     this.isCanCash = true;
-                    this.btn_cashOut.setGray(false);
+                    this.btn_cashOut.setGray(false, true);
                 } else {
                     this.isCanCash = false;
-                    this.btn_cashOut.setGray(true);
+                    this.btn_cashOut.setGray(true, true);
                 }
 
                 let needV = data.money / 100;
@@ -145,14 +145,14 @@ export default class WalletCashOut extends cc.Component {
                 this.lbl_tip.string = `需要${needV}元,当前有` + haveV;
             } else {
                 this.isCanCash = false;
-                this.btn_cashOut.setGray(true);
+                this.btn_cashOut.setGray(true, true);
                 let needV = data.money / 100;
                 let haveV = (gData.gameData.playerProp.redMoney / 1000000).toFixed(3) + '元';
                 this.lbl_tip.string = `需要${needV}元,当前只有` + haveV;
             }
         } else {
             this.isCanCash = false;
-            this.btn_cashOut.setGray(true);
+            this.btn_cashOut.setGray(true, true);
             this.lbl_tip.string = '';
         }
 
@@ -180,7 +180,7 @@ export default class WalletCashOut extends cc.Component {
             if (isRemainTimes) {
                 this.curChooseIndex = -1;
                 this.isCanCash = false;
-                this.btn_cashOut.setGray(true);
+                this.btn_cashOut.setGray(true, true);
                 this.lbl_tip.string = '';
             }
             gData.walletCashOutData.init_cashOut = false;
@@ -228,6 +228,8 @@ export default class WalletCashOut extends cc.Component {
                 gData.walletCashOutData.HttpCashOut2(this.curChooseIndex + 1);
             }
 
+        }else{
+            mk.tip.pop('红包币不足');
         }
     }
 

部分文件因为文件数量过多而无法显示