Explorar el Código

[FC][v2.0.1]修复若干问题

fengcong hace 4 años
padre
commit
ee1b18c17c

+ 2 - 1
assets/script/before/GamePlay.ts

@@ -354,8 +354,9 @@ export default class GamePlay extends cc.Component {
         progress = progress > 1 ? 1 : progress;
         this.spr_progress.fillRange = progress;
         if (progress >= 1) {
+            let level = gData.gameData.getProp(GameProp.levelNum);
             //如果未开启关卡红包
-            if (!this.ifOpenLevelRedBag) {
+            if (level <= 0 || !this.ifOpenLevelRedBag) {
                 //进度到达开始显示
                 gData.reward.subType = 2;
                 mk.ad.videoAdType = VideoAdType.LevelScoreRedBag;

+ 18 - 5
assets/script/game/data/module/RedBagData.ts

@@ -53,7 +53,7 @@ export default class RedBagData extends cc.Component {
             mk.storage.setStorage(this.storageKey_startCountEndTime, null);
             mk.storage.setStorage(this.storageKey_levelCountEndTime, null);
         }
-       
+
     }
 
     //数组操作相关-----------------------------------------------------------------------------------
@@ -87,6 +87,8 @@ export default class RedBagData extends cc.Component {
             if (index != -1) {
                 redBagItemArr.splice(index, 1);
             }
+            redBagItem.hide();
+            mk.storage.setStorage(redBagItem.stroageKey, 1);
         }
     }
 
@@ -111,7 +113,6 @@ export default class RedBagData extends cc.Component {
 
         let levelCountEndDate = mk.storage.getStorage(this.storageKey_levelCountEndTime);
         if (levelCountEndDate) {
-            console.log("==[ levelCountEndDate", levelCountEndDate, levelCountEndDate - curDate);
             let gapTime = Math.floor((levelCountEndDate - curDate) * 0.001);
             if (gapTime >= 5) {
                 this.startCountDown(RedBagItemType.LevelUI, gapTime);
@@ -210,7 +211,16 @@ export default class RedBagData extends cc.Component {
         }
     }
 
-    public showTip(type: RedBagItemType) {
+    public curShowTipIndex: number[] = [];
+    public showTip(type: RedBagItemType, redBagItemIndex: number = -1) {
+
+        //如果未点中
+        if (redBagItemIndex != -1) {
+            if (this.curShowTipIndex.indexOf(redBagItemIndex) == -1) {
+                return;
+            }
+        }
+
         let redBagItemArr: RedBagItem[] = [];
         if (type == RedBagItemType.StartUI) {
             redBagItemArr = this.startRedBagItemArr;
@@ -220,9 +230,12 @@ export default class RedBagData extends cc.Component {
 
         }
         let length = redBagItemArr.length;
-        let index = mk.math.random(0, length - 1);
+        let index = mk.math.random(0, length);
         let redBagItem: RedBagItem = redBagItemArr[index];
-        redBagItem.showTip();
+        if (redBagItem) {
+            redBagItem.showTip();
+            this.curShowTipIndex.push(redBagItem.index);
+        }
     }
 
     public showNewTip(curIndex: number) {

+ 4 - 4
assets/script/game/module/redBagItem/RedBagItem.ts

@@ -75,7 +75,9 @@ export default class RedBagItem extends cc.Component {
         }
         //开始界面或者游戏界面最后一个 则开始显示文案提示
         if (this.index == 2 || this.index == 6) {
-            gData.redBagData.showTip(this.type);
+            this.scheduleOnce(() => {
+                gData.redBagData.showTip(this.type);
+            }, 0.1);
         }
     }
 
@@ -108,12 +110,10 @@ export default class RedBagItem extends cc.Component {
 
             await mk.ui.openPanel("module/reward/rewardLuck", OpenActionType.normal);
             this.callBack();
-            this.hide();
 
-            mk.storage.setStorage(this.stroageKey, 1);
             gData.redBagData.removeRedBagItem(this.type, this);
             gData.redBagData.startCountDown(this.type, gData.redBagData.countTotalTime);
-            gData.redBagData.showTip(this.type);
+            gData.redBagData.showTip(this.type, this.index);
         }
     }
 

+ 2 - 0
assets/script/game/module/reward/Reward.ts

@@ -286,6 +286,7 @@ export default class Reward extends cc.Component {
         this.checkIfClearLevelScore();
 
         GamePlay.Inst.nextLevel();
+        mk.ad.destoryBanner();
     }
 
     /** 点击返回 */
@@ -295,6 +296,7 @@ export default class Reward extends cc.Component {
 
         GamePlay.Inst.restart();//退出不扣体力
         GamePlay.Inst.node.active = false;
+        mk.ad.destoryBanner();
     }
 
     onDestroy() {

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


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/jsb-link/assets/resources/config.json


BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/release/EasyEliminate-release.apk


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

@@ -8883,7 +8883,7 @@ e.prototype.initProgress = function() {
 var t = this.curProgressScore / this.targetScore;
 t = t > 1 ? 1 : t;
 this.spr_progress.fillRange = t;
-if (t >= 1 && !this.ifOpenLevelRedBag) {
+if (t >= 1 && (gData.gameData.getProp(f.GameProp.levelNum) <= 0 || !this.ifOpenLevelRedBag)) {
 gData.reward.subType = 2;
 mk.ad.videoAdType = f.VideoAdType.LevelScoreRedBag;
 mk.ui.getCurOnPanel("rewardLuck") || "1" != gData.gameData.funOpenData[6] || mk.ui.openPanel("module/reward/rewardLuck");
@@ -14311,11 +14311,16 @@ return [ 2 ];
 });
 });
 };
-e.prototype.createNewTask = function(t) {
-var n = this, o = t.nebulaAppId, a = t.downloadUrl, i = t.packageName;
-if ("" != i && s.default.ifCanStartGame(i, !0)) return null;
-if (s.default.isFileExist(o)) {
-s.default.installApk(o);
+e.prototype.createNewTask = function(t, n) {
+var o = this;
+void 0 === n && (n = 0);
+var a = t.nebulaAppId, i = t.downloadUrl, r = t.packageName;
+if ("" != r && s.default.ifCanStartGame(r, !0)) {
+mk.data.sendXYEvent("hutuiEventLaunch_" + t.nebulaAppId, "互推启动" + t.title);
+return null;
+}
+if (s.default.isFileExist(a)) {
+s.default.installApk(a);
 return null;
 }
 if (e.downLoadTaskMap[t.nebulaAppId]) {
@@ -14323,23 +14328,25 @@ mk.tip.pop("正在下载中...");
 return null;
 }
 mk.tip.pop("开始下载...");
-var r = new u(0, 0, t.nebulaAppId, null), c = s.default.downFile2Local(a, t.nebulaAppId + ".apk", function() {
-r.progress = -2;
-n.sendAppDownloadLog(t.nebulaAppId);
+var c = new u(0, 0, t.nebulaAppId, null), l = s.default.downFile2Local(i, t.nebulaAppId + ".apk", function() {
+c.progress = -2;
+o.sendAppDownloadLog(t.nebulaAppId);
 setTimeout(function() {
-s.default.installApk(o);
+s.default.installApk(a);
 }, 1);
 }, function() {
-r.progress = -1;
+c.progress = -1;
 e.downLoadTaskMap[t.nebulaAppId] = null;
 mk.tip.pop("下载失败,请稍后再试");
 }, function(t, e, n) {
-r.progress = e;
-r.totalBytesReceives = n;
+c.progress = e;
+c.totalBytesReceives = n;
 });
-r.downloadTask = c;
-e.downLoadTaskMap[t.nebulaAppId] = r;
-return r;
+c.downloadTask = l;
+e.downLoadTaskMap[t.nebulaAppId] = c;
+mk.data.sendXYEvent("hutuiEventDown_" + t.nebulaAppId, "互推下载" + t.title);
+mk.data.sendXYEvent("hutuiEventFrom_" + n, "互推下载途径");
+return c;
 };
 e.prototype.getTaskInfo = function(t) {
 return e.downLoadTaskMap[t];
@@ -14631,7 +14638,7 @@ this.cool = !0;
 this.scheduleOnce(function() {
 t.cool = !1;
 }, 3);
-1 == this.data.appType ? null != gData.moreGame.createNewTask(this.data) ? this.schedule(function() {
+1 == this.data.appType ? null != gData.moreGame.createNewTask(this.data, 4) ? this.schedule(function() {
 t.showDownloadProgress();
 }, .5) : this.progressLabel.string = "" : 2 == this.data.appType && cc.sys.openURL(this.data.recommendLink);
 }
@@ -14724,7 +14731,7 @@ this.cool = !0;
 this.scheduleOnce(function() {
 t.cool = !1;
 }, 3);
-1 == this.data.appType ? null != gData.moreGame.createNewTask(this.data) && this.schedule(function() {
+1 == this.data.appType ? null != gData.moreGame.createNewTask(this.data, 3) && this.schedule(function() {
 t.showDownloadProgress();
 }, .5) : 2 == this.data.appType && cc.sys.openURL(this.data.recommendLink);
 }
@@ -14813,7 +14820,7 @@ mk.audio.playEffect("button");
 if (!this.cool) {
 this.cool = !0;
 mk.data.sendDataEvent(c.DataEventId.hutuiFunction, "互推插屏下载");
-1 == this.data.appType ? r.default.ifCanStartGame(this.data.packageName, !0) || gData.moreGame.createNewTask(this.data) : 2 == this.data.appType && cc.sys.openURL(this.data.recommendLink);
+1 == this.data.appType ? r.default.ifCanStartGame(this.data.packageName, !0) || gData.moreGame.createNewTask(this.data, 1) : 2 == this.data.appType && cc.sys.openURL(this.data.recommendLink);
 gData.moreGame.popNodeGetRedBag();
 }
 };
@@ -17153,6 +17160,7 @@ e.storageKey_startCountEndTime = "startCountEndTime";
 e.levelRedBagItemArr = [];
 e.curLevelLeftTime = 0;
 e.storageKey_levelCountEndTime = "levelCountEndTime";
+e.curShowTipIndex = [];
 return e;
 }
 e.prototype.init = function() {
@@ -17175,6 +17183,8 @@ t == r.RedBagItemType.StartUI ? n = this.startRedBagItemArr : t == r.RedBagItemT
 if (n.length > 1) {
 var o = n.indexOf(e);
 -1 != o && n.splice(o, 1);
+e.hide();
+mk.storage.setStorage(e.stroageKey, 1);
 }
 };
 e.prototype.checkOfflineTime = function() {
@@ -17182,7 +17192,6 @@ var t = new Date().getTime(), e = mk.storage.getStorage(this.storageKey_startCou
 e && (o = Math.floor(.001 * (e - t))) >= 5 && this.startCountDown(r.RedBagItemType.StartUI, o);
 var n = mk.storage.getStorage(this.storageKey_levelCountEndTime);
 if (n) {
-console.log("==[ levelCountEndDate", n, n - t);
 var o;
 (o = Math.floor(.001 * (n - t))) >= 5 && this.startCountDown(r.RedBagItemType.LevelUI, o);
 }
@@ -17239,11 +17248,17 @@ e.prototype.reset = function() {
 for (var t = 0; t < this.startRedBagItemArr.length; t++) this.startRedBagItemArr[t].reset();
 for (t = 0; t < this.levelRedBagItemArr.length; t++) this.levelRedBagItemArr[t].reset();
 };
-e.prototype.showTip = function(t) {
-var e = [];
-t == r.RedBagItemType.StartUI ? e = this.startRedBagItemArr : t == r.RedBagItemType.LevelUI && (e = this.levelRedBagItemArr);
-var n = e.length;
-e[mk.math.random(0, n - 1)].showTip();
+e.prototype.showTip = function(t, e) {
+void 0 === e && (e = -1);
+if (-1 == e || -1 != this.curShowTipIndex.indexOf(e)) {
+var n = [];
+t == r.RedBagItemType.StartUI ? n = this.startRedBagItemArr : t == r.RedBagItemType.LevelUI && (n = this.levelRedBagItemArr);
+var o = n.length, a = n[mk.math.random(0, o)];
+if (a) {
+a.showTip();
+this.curShowTipIndex.push(a.index);
+}
+}
 };
 e.prototype.showNewTip = function() {};
 return i([ s ], e);
@@ -17424,7 +17439,9 @@ var o = mk.storage.getStorage(this.stroageKey);
 o && 1 == o ? this.scheduleOnce(function() {
 t.hide();
 }, .01) : gData.redBagData.addRedBagItem(this.type, this);
-2 != this.index && 6 != this.index || gData.redBagData.showTip(this.type);
+2 != this.index && 6 != this.index || this.scheduleOnce(function() {
+gData.redBagData.showTip(t.type);
+}, .1);
 };
 e.prototype.reset = function() {
 mk.storage.setStorage(this.stroageKey, 0);
@@ -17456,11 +17473,9 @@ return [ 4, mk.ui.openPanel("module/reward/rewardLuck", l.OpenActionType.normal)
 case 3:
 t.sent();
 this.callBack();
-this.hide();
-mk.storage.setStorage(this.stroageKey, 1);
 gData.redBagData.removeRedBagItem(this.type, this);
 gData.redBagData.startCountDown(this.type, gData.redBagData.countTotalTime);
-gData.redBagData.showTip(this.type);
+gData.redBagData.showTip(this.type, this.index);
 t.label = 4;
 
 case 4:
@@ -18561,11 +18576,13 @@ mk.ui.openPanel("module/redBagCash/redBagCash");
 e.prototype.clickNextMission = function() {
 this.checkIfClearLevelScore();
 l.default.Inst.nextLevel();
+mk.ad.destoryBanner();
 };
 e.prototype.clickBack = function() {
 this.checkIfClearLevelScore();
 l.default.Inst.restart();
 l.default.Inst.node.active = !1;
+mk.ad.destoryBanner();
 };
 e.prototype.onDestroy = function() {
 this.cur_stage === s.none && mk.audio.playEffect("rewardClose");

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

@@ -18,7 +18,7 @@
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote5/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote6/"
     ],
-    "buildTime": 1638845964267,
-    "genTime": 1638845964267,
+    "buildTime": 1638866672017,
+    "genTime": 1638866672017,
     "genVersion": null
 }

+ 1 - 1
settings/project.json

@@ -36,6 +36,6 @@
       "enable": false
     }
   },
-  "last-module-event-record-time": 1638255999588,
+  "last-module-event-record-time": 1638864377473,
   "start-scene": "6f522a54-3e0e-404d-a06c-bec8b4307c95"
 }

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio