wuwangdong 4 tahun lalu
induk
melakukan
732a840221

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

@@ -138,6 +138,7 @@ export class FactoryIcon extends cc.Component {
             gData.gameData.changeLeftTimes(-1);
 
             gData.adData.checkPopRed();
+            gData.gameData.addProductMakeTimesById(this.data.productID);
 
             gData.gameData.isProducting = false;
 
@@ -167,7 +168,7 @@ export class FactoryIcon extends cc.Component {
     onRipe(sendToServer) {
         this.data.state = FactroyState.Ripe;
         gData.gameData.setFactoryDataMap(this.configID, this.data, sendToServer);
-        gData.gameData.addProductMakeTimesById(this.data.productID);
+        //gData.gameData.addProductMakeTimesById(this.data.productID);
     }
 
     onSick(sendToServer) {

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

@@ -534,7 +534,7 @@ export class GameData {
         if (response.errcode != 0) {
             return false;
         }
-
+        gData.gameData.init_task = true;
         this.playerProp.userFarmTaskInfo = response.data.userFarmTaskInfo;
         if (this.playerProp.userFarmTaskInfo.completeCount >= this.playerProp.userFarmTaskInfo.taskCount) {
             mk.ui.closeAllUI();

+ 43 - 49
assets/script/game/game/Game.ts

@@ -217,30 +217,29 @@ export default class Game extends cc.Component {
         //this.img_head.spriteFrame = new cc.SpriteFrame(result);
     }
 
+    isRefreshTask = false;
     private changeTaskUI() {
-        cc.tween(this.lbl_task.node).to(0.1, { scale: 1.2 }).to(0.1, { scale: 1 }).start();
-        if (gData.gameData.playerProp.userFarmTaskInfo) {
-            let com = gData.gameData.playerProp.userFarmTaskInfo.completeCount;
-            let count = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
-            //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=#D73D25>(${com}/${count})</color></b>`
-                if (com >= count) {
-                    this.node_hand.active = true;
-                } else {
-                    this.node_hand.active = false;
-                }
-            }
-            if (gData.gameData.playerProp.completeFarmTaskTimes < 1) {
-                //mk.tip.pop("百元红包进度+1");
-            }
+        //cc.tween(this.lbl_task.node).to(0.1, { scale: 1.2 }).to(0.1, { scale: 1 }).start();
+        if (!this.isRefreshTask) {
+            this.isRefreshTask = true;
+            cc.tween(this.lbl_task.node).delay(0.6).to(0.1, { scale: 1.2 }).to(0.1, { scale: 1 }).call(() => {
+                if (gData.gameData.playerProp.userFarmTaskInfo) {
+                    let com = gData.gameData.playerProp.userFarmTaskInfo.completeCount;
+                    let count = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
+                    this.lbl_task.string = `<b><color=#8D4D32>进行${count}次生产</c><color=#D73D25>(${com}/${count})</color></b>`
+                    if (com >= count) {
+                        this.node_hand.active = true;
+                    } else {
+                        this.node_hand.active = false;
+                    }
 
+                    // if (gData.gameData.playerProp.completeFarmTaskTimes < 1) {
+                    //     mk.tip.pop("百元红包进度+1");
+                    // }
+                    this.isRefreshTask = false;
+                }
+            }).start();
         }
-
         gData.gameData.init_task = false;
     }
 
@@ -419,8 +418,7 @@ export default class Game extends cc.Component {
     /** 点击种植 */
     public async onClickPlant() {
         mk.audio.playEffect("button");
-        if (gData.gameData.leftTimes <= 0) 
-        {
+        if (gData.gameData.leftTimes <= 0) {
             // mk.tip.pop('生产次数不足');
             mk.ui.openPanel('module/speedUpUI/productReward');
             return;
@@ -442,49 +440,45 @@ export default class Game extends cc.Component {
 
                 let addAni = cc.instantiate(this.ani_add3);
                 addAni.parent = this.ani_add3.parent;
-                addAni.getComponent(cc.Label).string = `百元红包:${com}/${count}`;      
-                cc.tween(addAni).call(()=>{
+                addAni.getComponent(cc.Label).string = `百元红包:${com}/${count}`;
+                cc.tween(addAni).call(() => {
                     addAni.opacity = 255;
-                }).by(0.8, {y : 100}).to(0.4, {opacity : 0}).call(()=>{
+                }).by(0.8, { y: 100 }).to(0.4, { opacity: 0 }).call(() => {
                     addAni.destroy();
                 }).start();
             }
-            
+
 
             this.dpFlyRedAni();
         }
     }
 
-    public dpFlyRedAni(starPos: cc.Vec2 = null)
-    {
-        if(starPos)
-        {
-            if(this.node_taskHb && this.node_taskHb.parent)
-            {
+    public dpFlyRedAni(starPos: cc.Vec2 = null) {
+        if (starPos) {
+            if (this.node_taskHb && this.node_taskHb.parent) {
                 let pos = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
                 mk.fly.PlayCoinAnim(1, 5, starPos, pos, () => {
                     console.log("dpFlyRedAni delay1-----");
-                    gData.gameData.init_task = true;
+                    //gData.gameData.init_task = true;
                 }, 0.8);
-            }else{
-                gData.gameData.init_task = true;
+            } else {
+                //gData.gameData.init_task = true;
                 console.log("dpFlyRedAni1-----");
             }
-            
-        }else{
 
-            if(this.node_taskHb && this.node_taskHb.parent && this.btn_product)
-            {
+        } else {
+
+            if (this.node_taskHb && this.node_taskHb.parent && this.btn_product) {
                 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;
+                    //gData.gameData.init_task = true;
                     console.log("dpFlyRedAni delay2-----");
                 }, 0.8);
-            }else{
-                gData.gameData.init_task = true;
+            } else {
+                //gData.gameData.init_task = true;
                 console.log("dpFlyRedAni2-----");
-            }          
-        }       
+            }
+        }
     }
 
 
@@ -517,12 +511,12 @@ export default class Game extends cc.Component {
             this.ani_add.node.getComponent(cc.Label).string = `+${exp}`;
             this.ani_add.node.active = true;
             this.ani_add.play();
-        }else{
+        } else {
 
-            this.ani_add2.getComponent(cc.Label).string = `生产次数+${exp}`;      
-            cc.tween(this.ani_add2).delay(1.3).call(()=>{
+            this.ani_add2.getComponent(cc.Label).string = `生产次数+${exp}`;
+            cc.tween(this.ani_add2).delay(1.3).call(() => {
                 this.ani_add2.opacity = 255;
-            }).by(0.8, {y : 100}).to(0.4, {opacity : 0}).call(()=>{
+            }).by(0.8, { y: 100 }).to(0.4, { opacity: 0 }).call(() => {
                 this.ani_add2.y = this.posY;
             }).start();
         }

TEMPAT SAMPAH
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/caches/build_file_checksums.ser


+ 1 - 1
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/gradle.properties

@@ -12,5 +12,5 @@ MY_APP_NAME=\u5f00\u5fc3\u519c\u4e50\u56ed
 PACKAGE_NAME=com.aries.kxnly.mz
 VERSION_NAME=1.0.0
 VERSION_CODE=1
-TOPON="a6078f65457f6f,66b742dd0e502b64d783d9c66a9d30c4,b6078f6a006916,b613180ff8bfea,b6078f6fe52b70,b6078f72ec4003,b6078f71eed53e,b6078f711d7007,b6078f6ddebed2"; //巨量渠道topon的 AppId,AppSecreate,激励视频,插屏,信息流,开屏,banner,全屏,大插屏
+TOPON="a614a8250add59,66b742dd0e502b64d783d9c66a9d30c4,b614a82cb8bc30,b614ac87eb4952,b614a82cf4e1bc,b614a82cebe4b5,b614a82cecd344,b614a82ce40be5,b614a82cd52ee7"; //巨量渠道topon的 AppId,AppSecreate,激励视频,插屏,信息流,开屏,banner,全屏,大插屏
 APP_CONFIG_CODE="1.0.0"