wuwangdong 4 سال پیش
والد
کامیت
0b072dbe29

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 188 - 139
assets/resources/game/prefab/game.prefab


+ 2 - 2
assets/resources/game/texture/coin/4.png.meta

@@ -7,8 +7,8 @@
   "premultiplyAlpha": false,
   "genMipmaps": false,
   "packable": true,
-  "width": 64,
-  "height": 71,
+  "width": 198,
+  "height": 288,
   "platformSettings": {},
   "subMetas": {
     "4": {

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

@@ -491,6 +491,19 @@ export class GameData {
     }
 
     private async updateNewTaskProgress() {
+
+        if(gData.gameData.init_redBagTask)
+        {
+            return;
+        }
+        if (gData.gameData.gameData.userFarmTaskInfo) {
+            let com = gData.gameData.gameData.userFarmTaskInfo.completeCount;
+            let count = gData.gameData.gameData.userFarmTaskInfo.taskCount;
+
+            if(com >= count)
+            return;
+        }
+
         let data = {};
         let response = await mk.http.sendData('farmTask/updateUserFarmTaskInfo', data);
         mk.console.logSingle('refrehTask=>', response);

+ 29 - 2
assets/script/game/game/Game.ts

@@ -55,6 +55,8 @@ export default class Game extends cc.Component {
     sp_levelPer: cc.Sprite = null;
     @property({ type: cc.Animation, displayName: '增加效果文本' })
     ani_add: cc.Animation = null;
+    @property({ type: cc.Node, displayName: '任务红包手' })
+    node_hand: cc.Node = null;
 
 
     /** 是否开始增加次数倒计时 */
@@ -179,7 +181,20 @@ export default class Game extends cc.Component {
         if (gData.gameData.gameData.userFarmTaskInfo) {
             let com = gData.gameData.gameData.userFarmTaskInfo.completeCount;
             let count = gData.gameData.gameData.userFarmTaskInfo.taskCount;
-            this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#7EB80E>(${com}/${count})</color></b>`
+            if(gData.gameData.init_redBagTask)
+            {
+                this.lbl_task.string = `<b><color=#8D4D32>点击领取任务!</c></b>`
+                this.node_hand.active = true;
+            }else{
+                this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#7EB80E>(${com}/${count})</color></b>`
+                if(com >= count)
+                {
+                    this.node_hand.active = true;
+                }else{
+                    this.node_hand.active = false;
+                }
+            }
+            
         }
 
     }
@@ -201,7 +216,19 @@ export default class Game extends cc.Component {
         if (gData.gameData.gameData.userFarmTaskInfo) {
             let com = gData.gameData.gameData.userFarmTaskInfo.completeCount;
             let count = gData.gameData.gameData.userFarmTaskInfo.taskCount;
-            this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#7EB80E>(${com}/${count})</color></b>`
+            if(gData.gameData.init_redBagTask)
+            {
+                this.lbl_task.string = `<b><color=#8D4D32>点击领取任务!</c></b>`
+                this.node_hand.active = true;
+            }else{
+                this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#7EB80E>(${com}/${count})</color></b>`
+                if(com >= count)
+                {
+                    this.node_hand.active = true;
+                }else{
+                    this.node_hand.active = false;
+                }
+            }
         }
 
         gData.gameData.init_task = false;

+ 3 - 2
assets/script/game/module/redBagTask/RedBagTask.ts

@@ -49,7 +49,7 @@ export default class RedBagTask extends cc.Component {
 
     start() {
         this.maxNum = gData.gameData.gameData.userFarmTaskInfo.taskCount;
-        //this.isShowNewTask = gData.gameData.init_redBagTask;
+        this.isShowNewTask = gData.gameData.init_redBagTask;
         if (this.isShowNewTask) {
             this.showNewTaskUI();
         } else {
@@ -72,6 +72,7 @@ export default class RedBagTask extends cc.Component {
         this.openBtn_ani.node.active = false;
         this.lbl_Ani.node.active = true;
         gData.gameData.init_redBagTask = false;
+        gData.gameData.init_task = true;
         gData.gameData.setProp(GameProp.redBagTaskRefresh, gData.gameData.init_redBagTask)
     }
 
@@ -212,7 +213,7 @@ export default class RedBagTask extends cc.Component {
         }
         gData.gameData.gameData.userFarmTaskInfo = response.data.userFarmTaskInfo;
         gData.gameData.init_redBagTask = true;
-        gData.gameData.init_task = true;
+        //gData.gameData.init_task = true;
        
         this.maxNum = gData.gameData.gameData.userFarmTaskInfo.taskCount;
         this.num = 0;

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است