wuwangdong il y a 4 ans
Parent
commit
3e864211e9

+ 1 - 1
assets/resources/data/guide_data.json

@@ -72,7 +72,7 @@
 		"dialogPos": ":200::::",
 		"dialogPos1": "",
 		"dialogAlignment": "0",
-		"dialog": "<color=8A4312><color=ff0000>继续生产</c>,很快就可\n以完成订单了!</color>",
+		"dialog": "<color=8A4312><color=ff0000>继续生产</c>,很快就可以完\n成订单了!</color>",
 		"displayRect": "",
 		"clickRect": "主界面层/game/功能按钮/底部按钮/中间按钮",
 		"finger": "100:20",

+ 2 - 2
assets/script/before/view/ui/PlantPanel.ts

@@ -69,8 +69,8 @@ export default class PlantPanel extends cc.Component {
                     {
                         this.tableView.contentMoveByIndex(gData.plantData.productIndex-1, 0.2);
                     }else{
-                        //this.tableView.moveButtom();
-                        this.tableView.contentMoveByIndex(this.list_data.length-4, 0.2, true);
+                        this.tableView.moveButtom();
+                        //this.tableView.contentMoveByIndex(this.list_data.length-4, 0.2, true);
                     }  
                 }
                      

+ 1 - 1
assets/script/game/component/TableView.ts

@@ -642,7 +642,7 @@ export default class TableView extends cc.Component {
     public moveButtom()
     {
         let pos = this.scrollView.getMaxScrollOffset();
-        this.scrollView.scrollToOffset(pos, 0.1);
+        this.scrollView.scrollToOffset(pos, 0.2);
     }
 
     public getItemByIndexAndCount(index: number, count: number) {

+ 8 - 4
assets/script/game/module/guide/Guide.ts

@@ -58,8 +58,8 @@ export default class Guide extends cc.Component {
         this.crtStep++;
         this.crtGuide = this.guides[this.crtStep];
         mk.guide.curGuideIdStr = gData.guideData.crtID + "_" + this.crtStep;
-        mk.data.sendDataEvent(DataEventId.guide, `新手引导第${gData.guideData.crtID}_${this.crtStep}步完成`);
         this.updateGuide();
+        mk.data.sendDataEvent(DataEventId.guide, `新手引导第${gData.guideData.crtID}_${this.crtStep}步完成`);
     }
 
     private updateGuide() {
@@ -303,7 +303,7 @@ export default class Guide extends cc.Component {
         this.node_click.width = 0
         this.node_click.height = 0;
         this.node_finger.opacity = 0;
-        this.node_dialog.opacity = 0;
+        this.node_dialog.opacity = 0
     }
 
 
@@ -311,15 +311,19 @@ export default class Guide extends cc.Component {
         mk.guide.close();
         // this.node.destroy();
         mk.guide.curGuideIdStr = null;
-        mk.guide.continueCallBack = null;
+        if(mk.guide.continueCallBack)
+        {
+            mk.guide.continueCallBack = null;
+        }
+        console.log("closeGuide ======");
         mk.ui.closePanel(this.node.name);
     }
 
     private clickSkip() {
         mk.audio.playEffect("button");
+        this.close();
         mk.data.sendXYEvent("guide", `skip_${gData.guideData.crtID}_${this.crtStep}`);
         mk.data.sendDataEvent(DataEventId.guideSkip, `新手引导第${gData.guideData.crtID}_${this.crtStep}步跳过`);
-        this.close();
     }
 
     protected onDestroy(): void {

+ 4 - 2
assets/script/game/module/hotUpdate/HotUpdatePanel.ts

@@ -58,8 +58,10 @@ export default class HotUpdatePanel extends cc.Component {
         options.OnUpdateSucceed = () => {
             // this.tipsLabel.string = '更新成功';
             console.log('更新成功');
-            cc.audioEngine.stopAll();
-            cc.game.restart();
+            setTimeout(() => {
+                cc.audioEngine.stopAll();
+                cc.game.restart();
+            }, 500);      
         };
         HotUpdate.init(this.manifest, options);
     }

+ 4 - 2
assets/script/game/module/login/Login.ts

@@ -220,8 +220,10 @@ export default class Login extends cc.Component {
                     cc.sys.localStorage.removeItem('HotUpdateSearchPaths');
                     jsb.fileUtils.setSearchPaths(storageArr);
 
-                    cc.audioEngine.stopAll();
-                    cc.game.restart();
+                    setTimeout(() => {
+                        cc.audioEngine.stopAll();
+                        cc.game.restart();
+                    }, 500); 
                 }
             }
         }

+ 34 - 25
assets/script/game/module/speedUpUI/ProductReward.ts

@@ -26,13 +26,15 @@ export default class ProductReward extends cc.Component {
     @property({ type: cc.Node, displayName: '节点2' })
     node_2: cc.Node = null;
 
+    private btnCanClick = true;
+
     onEnable() {
 
-        let isGuide = false;
         this.lbl_times.string = `生产次数+${gData.gameData.configs.ServerConfig.ProductionAd}`;
         this.lbl_times2.string = `生产次数+${gData.gameData.configs.ServerConfig.ProductionAd}`;
         gData.gameData.init_productTask = false;
-        if (gData.gameData.playerProp.userFarmTaskInfo) {
+        let id = gData.gameData.getProp(GameProp.guideID);
+        if (gData.gameData.playerProp.userFarmTaskInfo && id >= 11) {
             let com = gData.gameData.playerProp.userFarmTaskInfo.completeCount;
             let count = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
             if ((count - com) <= 10) {
@@ -41,23 +43,6 @@ export default class ProductReward extends cc.Component {
                     this.node_Uncomplete.active = true;
                     this.node_complete.active = false;
 
-                    isGuide = true;
-                    this.scheduleOnce(() => {
-                        let data = gData.gameData.playerProp.orderData;
-                        let orderData = data.orderTaskList;
-                        let copyData = gData.gameData.playerProp.copyOrderData;
-                        if (data && orderData && copyData) {
-                            let num = 0;
-                            for (let i = 0; i != orderData.length; ++i) {
-                                num += (orderData[i].taskCount - copyData[i])
-                            }
-                            if(gData.gameData.funOpenData[11] == "1")
-                            {
-                                let curDes = `<color=8A4312>再生产${num}次,就可以收获\n啦,完成订单立即<color=ff0000>提现</color>!</color>`;
-                                mk.guide.open(11, curDes);
-                            }                     
-                        }
-                    }, 0.5)
                 } else {
                     this.node_Uncomplete.active = false;
                     this.node_complete.active = true;
@@ -78,14 +63,34 @@ export default class ProductReward extends cc.Component {
             }
         }
 
-        if (isGuide) {
 
-            let id = gData.gameData.getProp(GameProp.guideID);
-            if (id >= 11) {
-                mk.ad.showNative();
-            }
-        } else {
+        if (id >= 11) {
             mk.ad.showNative();
+        } else {
+            this.btnCanClick = false;
+            this.lbl_taskTimes.string = "1";
+            this.node_Uncomplete.active = true;
+            this.node_complete.active = false;
+
+            this.sp_taskProgress.fillRange = 0.99;
+            this.lbl_progress.string = "99%";
+
+            this.scheduleOnce(() => {
+                this.btnCanClick = true;
+                let data = gData.gameData.playerProp.orderData;
+                let orderData = data.orderTaskList;
+                let copyData = gData.gameData.playerProp.copyOrderData;
+                if (data && orderData && copyData) {
+                    let num = 0;
+                    for (let i = 0; i != orderData.length; ++i) {
+                        num += (orderData[i].taskCount - copyData[i])
+                    }
+                    if (gData.gameData.funOpenData[11] == "1") {
+                        let curDes = `<color=8A4312>再生产${num}次,就可以收获\n啦,完成订单立即<color=ff0000>提现</color>!</color>`;
+                        mk.guide.open(11, curDes);
+                    }
+                }
+            }, 0.2)
         }
     }
 
@@ -117,6 +122,10 @@ export default class ProductReward extends cc.Component {
 
     private clickVideoBtn() {
         mk.audio.playEffect("button");
+        if(!this.btnCanClick)
+        {
+            return;
+        }
         mk.ui.closePanel(this.node.name);
         mk.ad.videoAdType = VideoAdType.video_init_16;
         mk.ad.watchAd((success: boolean) => {

+ 3 - 3
assets/script/mk/system/UISystem.ts

@@ -151,14 +151,14 @@ export default class UISystem extends cc.Component {
          */
     closeAllUI(except: string[] = ["game", "guide"]) {
         for (let panelName in this.curOnPanelDic) {
+            if (except && except.length > 0 && except.indexOf(panelName) != -1) {
+                continue;
+            }
             if (this.isPanelClosingArr.indexOf(panelName) != -1) {
                 continue;
             }
             this.isPanelClosingArr.push(panelName);
 
-            if (except && except.length > 0 && except.indexOf(panelName) != -1) {
-                continue;
-            }
             let node_panel = this.getCurOnPanel(panelName);
             if (!node_panel) {
                 continue;

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


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
build/jsb-link/assets/resources/config.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
build/jsb-link/assets/resources/import/23/2301f946-ef9d-4d93-b296-1f8ff5b307d3.json


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


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

@@ -16888,8 +16888,8 @@ e.prototype.nextStep = function() {
 this.crtStep++;
 this.crtGuide = this.guides[this.crtStep];
 mk.guide.curGuideIdStr = gData.guideData.crtID + "_" + this.crtStep;
-mk.data.sendDataEvent(s.DataEventId.guide, "新手引导第" + gData.guideData.crtID + "_" + this.crtStep + "步完成");
 this.updateGuide();
+mk.data.sendDataEvent(s.DataEventId.guide, "新手引导第" + gData.guideData.crtID + "_" + this.crtStep + "步完成");
 };
 e.prototype.updateGuide = function() {
 var t = this;
@@ -17078,14 +17078,15 @@ this.node_dialog.opacity = 0;
 e.prototype.close = function() {
 mk.guide.close();
 mk.guide.curGuideIdStr = null;
-mk.guide.continueCallBack = null;
+mk.guide.continueCallBack && (mk.guide.continueCallBack = null);
+console.log("closeGuide ======");
 mk.ui.closePanel(this.node.name);
 };
 e.prototype.clickSkip = function() {
 mk.audio.playEffect("button");
+this.close();
 mk.data.sendXYEvent("guide", "skip_" + gData.guideData.crtID + "_" + this.crtStep);
 mk.data.sendDataEvent(s.DataEventId.guideSkip, "新手引导第" + gData.guideData.crtID + "_" + this.crtStep + "步跳过");
-this.close();
 };
 e.prototype.onDestroy = function() {
 this.node_click.off(cc.Node.EventType.TOUCH_START, this.clickNodeClick, this);
@@ -17799,8 +17800,10 @@ r.default.checkUpdate();
 };
 e.OnUpdateSucceed = function() {
 console.log("更新成功");
+setTimeout(function() {
 cc.audioEngine.stopAll();
 cc.game.restart();
+}, 500);
 };
 r.default.init(this.manifest, e);
 };
@@ -20063,8 +20066,10 @@ jsb.fileUtils.removeDirectory(r);
 }
 cc.sys.localStorage.removeItem("HotUpdateSearchPaths");
 jsb.fileUtils.setSearchPaths(o);
+setTimeout(function() {
 cc.audioEngine.stopAll();
 cc.game.restart();
+}, 500);
 }
 }
 }
@@ -23896,7 +23901,7 @@ var t = this;
 this.list_data = gData.plantData.productArr;
 this.tableView.node.emit("srollview-init", this.list_data);
 gData.plantData.productIndex > 1 && cc.tween(this).delay(.2).call(function() {
-t.list_data.length > 4 && (gData.plantData.productIndex <= t.list_data.length - 4 ? t.tableView.contentMoveByIndex(gData.plantData.productIndex - 1, .2) : t.tableView.contentMoveByIndex(t.list_data.length - 4, .2, !0));
+t.list_data.length > 4 && (gData.plantData.productIndex <= t.list_data.length - 4 ? t.tableView.contentMoveByIndex(gData.plantData.productIndex - 1, .2) : t.tableView.moveButtom());
 }).start();
 };
 e.prototype.onDestroy = function() {};
@@ -24497,31 +24502,22 @@ e.node_complete = null;
 e.node_Uncomplete = null;
 e.node_1 = null;
 e.node_2 = null;
+e.btnCanClick = !0;
 return e;
 }
 e.prototype.onEnable = function() {
-var t = this, e = !1;
+var t = this;
 this.lbl_times.string = "生产次数+" + gData.gameData.configs.ServerConfig.ProductionAd;
 this.lbl_times2.string = "生产次数+" + gData.gameData.configs.ServerConfig.ProductionAd;
 gData.gameData.init_productTask = !1;
-if (gData.gameData.playerProp.userFarmTaskInfo) {
+var e = gData.gameData.getProp(r.GameProp.guideID);
+if (gData.gameData.playerProp.userFarmTaskInfo && e >= 11) {
 var a = gData.gameData.playerProp.userFarmTaskInfo.completeCount, o = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
 if (o - a <= 10) {
 if (o > a) {
 this.lbl_taskTimes.string = (o - a).toString();
 this.node_Uncomplete.active = !0;
 this.node_complete.active = !1;
-e = !0;
-this.scheduleOnce(function() {
-var t = gData.gameData.playerProp.orderData, e = t.orderTaskList, a = gData.gameData.playerProp.copyOrderData;
-if (t && e && a) {
-for (var o = 0, n = 0; n != e.length; ++n) o += e[n].taskCount - a[n];
-if ("1" == gData.gameData.funOpenData[11]) {
-var i = "<color=8A4312>再生产" + o + "次,就可以收获\n啦,完成订单立即<color=ff0000>提现</color>!</color>";
-mk.guide.open(11, i);
-}
-}
-}, .5);
 } else {
 this.node_Uncomplete.active = !1;
 this.node_complete.active = !0;
@@ -24542,7 +24538,25 @@ this.node_1.active = !1;
 this.node_2.active = !0;
 }
 }
-e ? gData.gameData.getProp(r.GameProp.guideID) >= 11 && mk.ad.showNative() : mk.ad.showNative();
+if (e >= 11) mk.ad.showNative(); else {
+this.btnCanClick = !1;
+this.lbl_taskTimes.string = "1";
+this.node_Uncomplete.active = !0;
+this.node_complete.active = !1;
+this.sp_taskProgress.fillRange = .99;
+this.lbl_progress.string = "99%";
+this.scheduleOnce(function() {
+t.btnCanClick = !0;
+var e = gData.gameData.playerProp.orderData, a = e.orderTaskList, o = gData.gameData.playerProp.copyOrderData;
+if (e && a && o) {
+for (var n = 0, i = 0; i != a.length; ++i) n += a[i].taskCount - o[i];
+if ("1" == gData.gameData.funOpenData[11]) {
+var r = "<color=8A4312>再生产" + n + "次,就可以收获\n啦,完成订单立即<color=ff0000>提现</color>!</color>";
+mk.guide.open(11, r);
+}
+}
+}, .2);
+}
 };
 e.prototype.update = function() {
 if (gData.gameData.init_productTask) {
@@ -24570,6 +24584,7 @@ gData.gameData.init_productTask = !1;
 e.prototype.clickVideoBtn = function() {
 var t = this;
 mk.audio.playEffect("button");
+if (this.btnCanClick) {
 mk.ui.closePanel(this.node.name);
 mk.ad.videoAdType = r.VideoAdType.video_init_16;
 mk.ad.watchAd(function(e) {
@@ -24588,6 +24603,7 @@ mk.data.sendXYEvent("guide_production", "首次领取生产次数");
 }
 }
 });
+}
 };
 e.prototype.addTimes = function() {
 var t = parseInt(gData.gameData.configs.ServerConfig.ProductionAd);
@@ -28987,7 +29003,7 @@ this.scrollView.scrollToOffset(new cc.Vec2(o, this.content.y), e);
 };
 e.prototype.moveButtom = function() {
 var t = this.scrollView.getMaxScrollOffset();
-this.scrollView.scrollToOffset(t, .1);
+this.scrollView.scrollToOffset(t, .2);
 };
 e.prototype.getItemByIndexAndCount = function(t, e) {
 for (var a = [], o = 0; o != this.itemArr.length; ++o) for (var n = t; n != t + e; ++n) if (this.itemArr[o].index == n) {
@@ -31343,9 +31359,8 @@ a && a();
 };
 e.prototype.closeAllUI = function(t) {
 void 0 === t && (t = [ "game", "guide" ]);
-for (var e in this.curOnPanelDic) if (-1 == this.isPanelClosingArr.indexOf(e)) {
+for (var e in this.curOnPanelDic) if (!(t && t.length > 0 && -1 != t.indexOf(e)) && -1 == this.isPanelClosingArr.indexOf(e)) {
 this.isPanelClosingArr.push(e);
-if (!(t && t.length > 0 && -1 != t.indexOf(e))) {
 var a = this.getCurOnPanel(e);
 if (a) {
 var o = a.getComponent("EffectOpenAndClose");
@@ -31353,7 +31368,6 @@ o && o.isOpenCloseEffect ? o.hideEffect(this.destroyNode.bind(this, a, e)) : thi
 mk.event.emit("close-panel", e);
 }
 }
-}
 mk.ad.destroyNativeAd();
 mk.ad.destoryBanner();
 };

+ 7 - 6
packages-hot-update/cfg.json

@@ -1,16 +1,17 @@
 {
-    "version": "1.0.1",
-    "serverRootDir": "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyJsb/baseRemote/",
-    "resourceRootDir": "D:\\mokaszProjects\\team1_nc\\build\\jsb-link",
+    "version": "1.0.3",
+    "serverRootDir": "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsfTest/baseRemote/",
+    "resourceRootDir": "D:\\projects\\team1_nc\\build\\jsb-link",
     "genManifestDir": "",
     "hotAddressArray": [
         "http://",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyTest/baseRemote/",
-        "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyJsb/baseRemote/"
+        "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyJsb/baseRemote/",
+        "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsfTest/baseRemote/"
     ],
-    "buildTime": 1635399518359,
-    "genTime": 1635399518359,
+    "buildTime": 1635413152505,
+    "genTime": 1635413152505,
     "genVersion": null
 }

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
packages-hot-update/manifest/project.manifest


+ 1 - 1
packages-hot-update/manifest/version.manifest

@@ -1 +1 @@
-{"version":"1.0.1","packageUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsf/baseRemote/","remoteManifestUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsf/baseRemote/project.manifest","remoteVersionUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsf/baseRemote/version.manifest"}
+{"version":"1.0.3","packageUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsfTest/baseRemote/","remoteManifestUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsfTest/baseRemote/project.manifest","remoteVersionUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsfTest/baseRemote/version.manifest"}

BIN
packages-hot-update/versions/ver_1_0.1.zip


BIN
packages-hot-update/versions/ver_1_0.2.zip


BIN
packages-hot-update/versions/ver_1_0.3.zip


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff