瀏覽代碼

[FC][V2.0.1]核心功能开发

fengcong 4 年之前
父節點
當前提交
6991770bb8

+ 4 - 0
assets/resources/game/prefab/gameplay.prefab

@@ -1506,6 +1506,7 @@
     "node_tip": {
       "__id__": 22
     },
+    "type": 1,
     "index": 3,
     "onComplete": [
       {
@@ -2215,6 +2216,7 @@
     "node_tip": {
       "__id__": 44
     },
+    "type": 1,
     "index": 4,
     "onComplete": [
       {
@@ -2924,6 +2926,7 @@
     "node_tip": {
       "__id__": 66
     },
+    "type": 1,
     "index": 5,
     "onComplete": [
       {
@@ -3633,6 +3636,7 @@
     "node_tip": {
       "__id__": 88
     },
+    "type": 1,
     "index": 6,
     "onComplete": [
       {

+ 5 - 4
assets/resources/module/turnable/turnable.prefab

@@ -2026,7 +2026,7 @@
     "asset": {
       "__uuid__": "18e0b7f8-059f-4a52-9e57-690fe778a31a"
     },
-    "fileId": "d3Z2dZPxlCqY3I/qqgj90n",
+    "fileId": "dfkM1XbMtN2L44ldOi5Oig",
     "sync": false
   },
   {
@@ -2158,7 +2158,7 @@
     "asset": {
       "__uuid__": "18e0b7f8-059f-4a52-9e57-690fe778a31a"
     },
-    "fileId": "25gILcs+hPop60oprXEqBh",
+    "fileId": "a2/sZdzmtDpq21PL036CFx",
     "sync": false
   },
   {
@@ -2290,7 +2290,7 @@
     "asset": {
       "__uuid__": "18e0b7f8-059f-4a52-9e57-690fe778a31a"
     },
-    "fileId": "51Rdhj3hZEzLNg3SdsPRNG",
+    "fileId": "e8EqaQ8P9Iu5TqwdehBmkX",
     "sync": false
   },
   {
@@ -2503,7 +2503,7 @@
     "asset": {
       "__uuid__": "18e0b7f8-059f-4a52-9e57-690fe778a31a"
     },
-    "fileId": "0edKsBML9JobVgIidB0UVl",
+    "fileId": "7fy3f7EAVKVJdaXzGIQFGs",
     "sync": false
   },
   {
@@ -3728,6 +3728,7 @@
     },
     "design_block_node": null,
     "bClickClose": false,
+    "onComplete": [],
     "_id": ""
   },
   {

+ 45 - 13
assets/script/before/GamePlay.ts

@@ -87,6 +87,9 @@ export default class GamePlay extends cc.Component {
     @property(cc.Node)
     node_touchListenMask: cc.Node = null;
 
+    /** 是否开启关卡红包 */
+    public ifOpenLevelRedBag: boolean = false;
+
     /**当前进度得分 */
     public curProgressScore: number = 0;
     /**当前得分 */
@@ -173,6 +176,8 @@ export default class GamePlay extends cc.Component {
     onLoad() {
         GamePlay.Inst = this;
         mk.event.register("event_guide", this.clickGuide, this);
+
+        this.checkLevelRedBagSwitch();
     }
 
     private clickGuide(data: string) {
@@ -242,6 +247,18 @@ export default class GamePlay extends cc.Component {
         this.node_top.y = node_pos.y - 40;
     }
 
+    /** [FC][V2.0.1]检测关卡红包开关 */
+    checkLevelRedBagSwitch() {
+        let levelRedBagSwitch = gData.gameData.configs.GlobalCfg.levelRedBagSwitch;
+
+        if (levelRedBagSwitch) {
+            this.ifOpenLevelRedBag = levelRedBagSwitch == 0 ? false : true;
+        }
+        else {
+            this.ifOpenLevelRedBag = false;
+        }
+    }
+
     update(dt) {
         if (this.curProgressScore >= this.curGetScore) {
             if (this.curProgressScore == 0) {
@@ -337,12 +354,15 @@ export default class GamePlay extends cc.Component {
         progress = progress > 1 ? 1 : progress;
         this.spr_progress.fillRange = progress;
         if (progress >= 1) {
-            //进度到达开始显示
-            gData.reward.subType = 2;
-            mk.ad.videoAdType = VideoAdType.LevelScoreRedBag;
-            let node_rewardLuck = mk.ui.getCurOnPanel("rewardLuck");
-            if (!node_rewardLuck && gData.gameData.funOpenData['6'] == '1') {
-                mk.ui.openPanel("module/reward/rewardLuck");
+            //如果未开启关卡红包
+            if (!this.ifOpenLevelRedBag) {
+                //进度到达开始显示
+                gData.reward.subType = 2;
+                mk.ad.videoAdType = VideoAdType.LevelScoreRedBag;
+                let node_rewardLuck = mk.ui.getCurOnPanel("rewardLuck");
+                if (!node_rewardLuck && gData.gameData.funOpenData['6'] == '1') {
+                    mk.ui.openPanel("module/reward/rewardLuck");
+                }
             }
         }
 
@@ -1035,10 +1055,17 @@ export default class GamePlay extends cc.Component {
         GamePlay.Inst.ifGetPass = true;
         gData.gameData.setProp(GameProp.levelNum, ++levelNum);
 
-        if (gData.gameData.funOpenData['6'] == '1') {
-            let node_rewardLuck = mk.ui.getCurOnPanel("rewardLuck");
-            if (node_rewardLuck || this.finalGetScore >= this.targetScore) {
-                return;
+        if (!this.ifOpenLevelRedBag) {
+            if (gData.gameData.funOpenData['6'] == '1') {
+                let node_rewardLuck = mk.ui.getCurOnPanel("rewardLuck");
+                if (node_rewardLuck || this.finalGetScore >= this.targetScore) {
+                    return;
+                }
+                else {
+                    //游戏结算
+                    this.gameCount();
+                    console.log("gData.gameData.getProp(GameProp.levelNum)", gData.gameData.getProp(GameProp.levelNum));
+                }
             }
             else {
                 //游戏结算
@@ -1049,7 +1076,6 @@ export default class GamePlay extends cc.Component {
         else {
             //游戏结算
             this.gameCount();
-            console.log("gData.gameData.getProp(GameProp.levelNum)", gData.gameData.getProp(GameProp.levelNum));
         }
     }
 
@@ -1059,14 +1085,20 @@ export default class GamePlay extends cc.Component {
         if (node_getPropUI) {
             mk.ui.closePanel("GetPropUI");
         }
-
         this.gameOver();
     }
 
     /**游戏结束 */
     gameOver() {
         mk.data.setTAEventUser(1, 'video_play_time', 1);
-        mk.ui.openPanel("game/prefab/uiPanel/GameOverUI");
+        if (!this.ifOpenLevelRedBag) {
+            mk.ui.openPanel("game/prefab/uiPanel/GameOverUI");
+        }
+        else {
+            gData.reward.subType = 2;
+            mk.ad.videoAdType = VideoAdType.LevelScoreRedBag;
+            mk.ui.openPanel("module/reward/rewardMission");
+        }
     }
 
     checkBonusNum(cleanCellItemNum: number) {

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

@@ -95,7 +95,7 @@ export class GameData {
     }
 
     private initConfigs(data) {
-        // console.log('config  ', data);
+     
         this.configs = data;
         this.funOpenData = this.configs.ServerConfig.Functionswitch.split(",");
         gData.safeDepositBoxData.richBankConfig = this.configs.RichBankTaskCfg;

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

@@ -5,7 +5,7 @@
 export class HttpData {
 
     /** 服务器类型 0测试服 1正式服 2李扬服 3悍国服 */
-    public serverType: number = 1;
+    public serverType: number = 0;
 
     public getServerUrl(): string {
         switch (this.serverType) {

+ 164 - 64
assets/script/game/data/module/RedBagData.ts

@@ -6,59 +6,100 @@
 //  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
 
 import { Timer } from "../../../mk/system/TimerSystem";
-import RedBagItem from "../../module/redBagItem/RedBagItem";
+import RedBagItem, { RedBagItemType } from "../../module/redBagItem/RedBagItem";
 
 const { ccclass, property } = cc._decorator;
 
-/**气泡数据 */
+/**[FC][V2.0.1]气泡红包数据 */
 @ccclass
 export default class RedBagData extends cc.Component {
 
-    /** 是否开启 */
-    public ifOpen: boolean = false;
-    /** 倒计时时间 */
-    public countTime: number = 300;
-    private storageKey_startCountTime: string = "startCountTime";
-    // LIFE-CYCLE CALLBACKS:
-
     /** 是否初始化了 */
     public ifInit: boolean = false;
-    /** 气泡红包列表 */
-    private redBagItemArr: RedBagItem[] = [];
-    /** 当前倒计时剩余时间 */
-    public curLeftTime: number = 0;
 
-    /**
-     *
-     */
-    constructor() {
-        super();
-    }
+    /** 是否开启 */
+    public ifOpen: boolean = false;
+    /** 正在计时 */
+    public isCounting: boolean = false;
+    /** 总的倒计时时间 */
+    public countTotalTime: number = 300;
+
+    /** 开始界面 */
+    private startRedBagItemArr: RedBagItem[] = [];
+    /** 开始界面倒计时剩余时间 */
+    public curStartLeftTime: number = 0;
+    /** 开始界面倒计时的时间 */
+    private storageKey_startCountEndTime: string = "startCountEndTime";
+    /** 关卡界面 */
+    private levelRedBagItemArr: RedBagItem[] = [];
+    /** 关卡界面倒计时剩余时间 */
+    public curLevelLeftTime: number = 0;
+    /** 关卡界面倒计时的时间 */
+    private storageKey_levelCountEndTime: string = "levelCountEndTime";
 
     /**初始化 */
     public init() {
-
         if (this.ifInit) {
             return;
         }
-        console.log("===[v2.0.1] 初始化");
         this.ifInit = true;
-        this.checkOfflineTime();
+
+        this.ifOpen = gData.gameData.configs.GlobalCfg.redBagLimitSwitch == 0 ? false : true;
+        console.log("===[v2.0.1] 初始化 switch", gData.gameData.configs.GlobalCfg.redBagLimitSwitch, gData.gameData.configs.GlobalCfg.levelRedBagSwitch);
+        if (this.ifOpen) {
+            this.checkOfflineTime();
+        }
+        else {
+            mk.storage.setStorage(this.storageKey_startCountEndTime, null);
+            mk.storage.setStorage(this.storageKey_levelCountEndTime, null);
+        }
+       
+    }
+
+    //数组操作相关-----------------------------------------------------------------------------------
+    /** 添加进数组
+     *  @param type 气泡红包类型 
+     *  @param redBadItem 气泡红包脚本本身 
+     */
+    public addRedBagItem(type: RedBagItemType, redBadItem: RedBagItem) {
+        if (type == RedBagItemType.StartUI) {
+            this.startRedBagItemArr.push(redBadItem);
+        }
+        else if (type == RedBagItemType.LevelUI) {
+            this.levelRedBagItemArr.push(redBadItem);
+        }
+    }
+
+    /** 从数组中移除
+     *  @param type 气泡红包类型 
+     *  @param redBadItem 气泡红包脚本本身 
+     */
+    public removeRedBagItem(type: RedBagItemType, redBagItem: RedBagItem) {
+        let redBagItemArr: RedBagItem[] = [];
+        if (type == RedBagItemType.StartUI) {
+            redBagItemArr = this.startRedBagItemArr;
+        }
+        else if (type == RedBagItemType.LevelUI) {
+            redBagItemArr = this.levelRedBagItemArr;
+        }
+        if (redBagItemArr.length > 1) {
+            let index = redBagItemArr.indexOf(redBagItem);
+            if (index != -1) {
+                redBagItemArr.splice(index, 1);
+            }
+        }
     }
 
+    //倒计时相关---------------------------------------------------------------------------------------
     /** 检测离线时间 */
     public checkOfflineTime() {
         let curDate = new Date().getTime();
-        let lastDate = mk.storage.getStorage(this.storageKey_startCountTime);
-        console.log("===[v2.0.1] lastDat", lastDate);
-        if (lastDate) {
-            let gapTime = Math.floor((curDate - lastDate) * 0.001);
-            console.log("===[v2.0.1] gapTime", gapTime);
-            let leftTime = Math.floor(this.countTime - gapTime);
-            console.log("===[v2.0.1] leftTime", leftTime);
-            if (leftTime >= 5) {
-                this.curLeftTime = leftTime;
-                this.startCountDown(this.curLeftTime);
+        let startCountEndDate = mk.storage.getStorage(this.storageKey_startCountEndTime);
+        // console.log("===[v2.0.1] lastDate", lastDate);
+        if (startCountEndDate) {
+            let gapTime = Math.floor((startCountEndDate - curDate) * 0.001);
+            if (gapTime >= 5) {
+                this.startCountDown(RedBagItemType.StartUI, gapTime);
             }
             else {
 
@@ -67,19 +108,16 @@ export default class RedBagData extends cc.Component {
         else {
 
         }
-    }
 
-    /** 添加进数组 */
-    public addRedBagItem(redBadItem: RedBagItem) {
-        this.redBagItemArr.push(redBadItem);
-    }
+        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);
+            }
+            else {
 
-    /** 从数组中移除 */
-    public removeRedBagItem(redBagItem: RedBagItem) {
-        if (this.redBagItemArr.length >= 1) {
-            let index = this.redBagItemArr.indexOf(redBagItem);
-            if (index != -1) {
-                this.redBagItemArr.splice(index, 1);
             }
         }
         else {
@@ -88,41 +126,103 @@ export default class RedBagData extends cc.Component {
     }
 
     /** 开始倒计时 */
-    public startCountDown(leftTime: number) {
-        this.curLeftTime = leftTime;
-        mk.tip.pop("气泡红包数据开始倒计时");
-        let date = new Date().getTime();
-        mk.storage.setStorage(this.storageKey_startCountTime, date);
+    public startCountDown(type: RedBagItemType, leftTime: number) {
+        console.log("===[v2.0.1 type", RedBagItemType[type], leftTime);
+        if (type == RedBagItemType.StartUI) {
+            this.curStartLeftTime = leftTime;
+            let countEnddate = new Date().getTime() + leftTime * 1000;
+            mk.storage.setStorage(this.storageKey_startCountEndTime, countEnddate);
+        }
+        else if (type == RedBagItemType.LevelUI) {
+            this.curLevelLeftTime = leftTime;
+            let countEnddate = new Date().getTime() + leftTime * 1000;
+            mk.storage.setStorage(this.storageKey_levelCountEndTime, countEnddate);
+        }
 
-        this.schedule(this.countDown, 1);
+        if (!this.isCounting) {
+            this.isCounting = true;
+            this.schedule(this.countDown, 1);
+        }
     }
 
     /** 倒计时 */
     countDown() {
-        let time = --this.curLeftTime;
-        if (time <= 0) {
-            this.curLeftTime = 0;
-            this.stopCountDown();
-            return;
+        if (this.curStartLeftTime > 0) {
+            let time = --this.curStartLeftTime;
+            if (time <= 0) {
+                this.curStartLeftTime = 0;
+                this.stopCountDown(RedBagItemType.StartUI);
+                return;
+            }
+            let timeStr = mk.time.format(time, "m:s");
+            for (var i = 0; i < this.startRedBagItemArr.length; i++) {
+                let redBagItem: RedBagItem = this.startRedBagItemArr[i];
+                redBagItem.countDown(timeStr);
+            }
         }
-        let timeStr = mk.time.format(time, "m:s");
-        for (var i = 0; i < this.redBagItemArr.length; i++) {
-            let redBagItem: RedBagItem = this.redBagItemArr[i];
-            redBagItem.countDown(timeStr);
+
+        if (this.curLevelLeftTime > 0) {
+            let time = --this.curLevelLeftTime;
+            if (time <= 0) {
+                this.curLevelLeftTime = 0;
+                this.stopCountDown(RedBagItemType.LevelUI);
+                return;
+            }
+            let timeStr = mk.time.format(time, "m:s");
+            for (var i = 0; i < this.levelRedBagItemArr.length; i++) {
+                let redBagItem: RedBagItem = this.levelRedBagItemArr[i];
+                redBagItem.countDown(timeStr);
+            }
         }
     }
 
     /** 结束倒计时 */
-    public stopCountDown() {
-        this.unschedule(this.countDown);
-        for (var i = 0; i < this.redBagItemArr.length; i++) {
-            let redBagItem: RedBagItem = this.redBagItemArr[i];
-            redBagItem.stopCountDown();
+    public stopCountDown(type: RedBagItemType) {
+        if (type == RedBagItemType.StartUI) {
+            for (var i = 0; i < this.startRedBagItemArr.length; i++) {
+                let redBagItem: RedBagItem = this.startRedBagItemArr[i];
+                redBagItem.stopCountDown();
+            }
+            mk.storage.setStorage(this.storageKey_startCountEndTime, null);
+        }
+        else if (type == RedBagItemType.LevelUI) {
+            for (var i = 0; i < this.levelRedBagItemArr.length; i++) {
+                let redBagItem: RedBagItem = this.levelRedBagItemArr[i];
+                redBagItem.stopCountDown();
+            }
+            mk.storage.setStorage(this.storageKey_levelCountEndTime, null);
+        }
+
+        if (this.curStartLeftTime <= 0 && this.curLevelLeftTime <= 0) {
+            this.isCounting = false;
+            this.unschedule(this.countDown);
         }
     }
 
-    public showTip() {
+    reset() {
+        for (var i = 0; i < this.startRedBagItemArr.length; i++) {
+            let redBagItem: RedBagItem = this.startRedBagItemArr[i];
+            redBagItem.reset();
+        }
+        for (var i = 0; i < this.levelRedBagItemArr.length; i++) {
+            let redBagItem: RedBagItem = this.levelRedBagItemArr[i];
+            redBagItem.reset();
+        }
+    }
 
+    public showTip(type: RedBagItemType) {
+        let redBagItemArr: RedBagItem[] = [];
+        if (type == RedBagItemType.StartUI) {
+            redBagItemArr = this.startRedBagItemArr;
+        }
+        else if (type == RedBagItemType.LevelUI) {
+            redBagItemArr = this.levelRedBagItemArr;
+
+        }
+        let length = redBagItemArr.length;
+        let index = mk.math.random(0, length - 1);
+        let redBagItem: RedBagItem = redBagItemArr[index];
+        redBagItem.showTip();
     }
 
     public showNewTip(curIndex: number) {

+ 2 - 1
assets/script/game/module/pigBank/PigBank.ts

@@ -19,7 +19,7 @@ export default class PigBank extends cc.Component {
     private anim_btn_cash: cc.Animation = null!;
 
     onLoad() {
-
+        mk.ad.bannerOperOnlyFullScreen(0);
     }
 
     start() {
@@ -114,6 +114,7 @@ export default class PigBank extends cc.Component {
 
     /** 点击关闭 */
     onClickClose() {
+        mk.ad.bannerOperOnlyFullScreen(1);
         mk.ad.checkShowInterByChance();
     }
 

+ 54 - 19
assets/script/game/module/redBagItem/RedBagItem.ts

@@ -8,8 +8,15 @@
 import { OpenActionType } from "../../../mk/system/UISystem";
 import TimeUtil from "../../../mk/utils/TimeUtil";
 
-const { ccclass, property } = cc._decorator;
+export enum RedBagItemType {
+    /** 开始界面 */
+    StartUI = 0,
+    /** 关卡界面 */
+    LevelUI = 1
+}
 
+const { ccclass, property } = cc._decorator;
+/** [FC][V2.0.1]气泡红包新增脚本 */
 @ccclass
 export default class RedBagItem extends cc.Component {
 
@@ -19,6 +26,8 @@ export default class RedBagItem extends cc.Component {
     public node_qipaoBg: cc.Node = null;
     @property(cc.Node)
     public node_tip: cc.Node = null;
+    @property({ type: cc.Enum(RedBagItemType), displayName: '气泡红包类型' })
+    public type: number = 0;
     @property(cc.Integer)
     public index: number = 0;
     @property({ displayName: '点击回调', tooltip: "点击时触发", type: cc.Component.EventHandler })
@@ -44,17 +53,29 @@ export default class RedBagItem extends cc.Component {
 
         //显示之后再初始化
         gData.redBagData.init();
-
         this.stroageKey = `RedBagItem${this.index}`
-        // this.reset();
+
+        let curDate = mk.time.getNowDayString(new Date().getTime());
+        let lastDate = mk.time.getNowDayString(gData.gameData.gameData.lastTime * 1000);
+        console.log("===[v2.0.1] curDate != lastDate", "curDate:" + curDate, "lastDate:" + lastDate, "curDate != lastDate:" + curDate != lastDate);
+        if (curDate != lastDate) {
+            mk.storage.setStorage(this.stroageKey, 0);
+        }
         let ifClicked = mk.storage.getStorage(this.stroageKey);
+        // console.log("===[v2.0.1] ifClicked && ifClicked == 1", ifClicked && ifClicked == 1, "=+++ " + ifClicked);
         /** 有值 且 为1(0 也会被判定为有值) */
         if (ifClicked && ifClicked == 1) {
-            this.hide();
+            this.scheduleOnce(() => {
+                this.hide();
+            }, 0.01)
         }
         else {
-            console.log("===[v2.0.1]", "RedBagItem active" + this.node.active + "inxdex:" + this.index);
-            gData.redBagData.addRedBagItem(this);
+            // console.log("===[v2.0.1]", "RedBagItem active" + this.node.active + "inxdex:" + this.index);
+            gData.redBagData.addRedBagItem(this.type, this);
+        }
+        //开始界面或者游戏界面最后一个 则开始显示文案提示
+        if (this.index == 2 || this.index == 6) {
+            gData.redBagData.showTip(this.type);
         }
     }
 
@@ -65,7 +86,6 @@ export default class RedBagItem extends cc.Component {
 
     /** 被点击 */
     async onClick() {
-        console.log("===[v2.0.1] 点击点击");
         //如果未开启,则不操作
         if (!gData.redBagData.ifOpen) {
             await mk.ui.openPanel("module/reward/rewardLuck", OpenActionType.normal);
@@ -73,17 +93,34 @@ export default class RedBagItem extends cc.Component {
         }
         else {
             //倒计时未结束,则不操作
-            if (gData.redBagData.curLeftTime >= 1) {
-                mk.tip.pop("请等待倒计时结束之后领取红包");
-                return;
+            if (this.type == RedBagItemType.StartUI) {
+                if (gData.redBagData.curStartLeftTime >= 1) {
+                    mk.tip.pop("请等待倒计时结束之后领取红包");
+                    return;
+                }
+            }
+            else if (this.type == RedBagItemType.LevelUI) {
+                if (gData.redBagData.curLevelLeftTime >= 1) {
+                    mk.tip.pop("请等待倒计时结束之后领取红包");
+                    return;
+                }
             }
+
             await mk.ui.openPanel("module/reward/rewardLuck", OpenActionType.normal);
             this.callBack();
-
             this.hide();
+
             mk.storage.setStorage(this.stroageKey, 1);
-            gData.redBagData.removeRedBagItem(this);
-            gData.redBagData.startCountDown(gData.redBagData.countTime);
+            gData.redBagData.removeRedBagItem(this.type, this);
+            gData.redBagData.startCountDown(this.type, gData.redBagData.countTotalTime);
+            gData.redBagData.showTip(this.type);
+        }
+    }
+
+    callBack() {
+        const c_count = this.onComplete.length;
+        for (let i = 0; i < c_count; i++) {
+            if (this.onComplete[i].handler) this.onComplete[i].emit([])
         }
     }
 
@@ -103,16 +140,14 @@ export default class RedBagItem extends cc.Component {
 
     /** 隐藏 */
     hide() {
+        console.log("==[v2.0.1 index :" + this.index, "隐藏");
         this.node.active = false;
         if (this.node_tip.active) {
             this.node_tip.active = false;
         }
     }
 
-    callBack() {
-        const c_count = this.onComplete.length;
-        for (let i = 0; i < c_count; i++) {
-            if (this.onComplete[i].handler) this.onComplete[i].emit([])
-        }
+    showTip() {
+        this.node_tip.active = true;
     }
-}
+}

+ 22 - 12
assets/script/game/module/reward/Reward.ts

@@ -164,18 +164,18 @@ export default class Reward extends cc.Component {
         }
         if (this.lid_type === LidType.mission) {
             // 关卡结算红包
-            mk.ad.watchAd((success: boolean,request_id: string) => {
+            mk.ad.watchAd((success: boolean, request_id: string) => {
                 mk.console.log("watchAD:" + success);
                 if (success) {
-                    gData.adData.watchVideo(AdFun.settlement,request_id);
+                    gData.adData.watchVideo(AdFun.settlement, request_id);
                     this.clickNextMission();
                 }
             });
         } else {
-            mk.ad.watchAd((success: boolean,request_id: string) => {
+            mk.ad.watchAd((success: boolean, request_id: string) => {
                 mk.console.log("watchAD:" + success);
                 if (success) {
-                    gData.adData.watchVideo(gData.reward.subType === 2 ? AdFun.checkpoint : AdFun.bubble,request_id);
+                    gData.adData.watchVideo(gData.reward.subType === 2 ? AdFun.checkpoint : AdFun.bubble, request_id);
                     //FC:不需要置空
                     // gData.reward.subType = null;
                 }
@@ -282,11 +282,17 @@ export default class Reward extends cc.Component {
      * 下一关操作
      */
     public clickNextMission() {
+        //如果是关卡消除红包 关闭之后则清除
+        this.checkIfClearLevelScore();
+
         GamePlay.Inst.nextLevel();
     }
 
     /** 点击返回 */
     public clickBack() {
+        //如果是关卡消除红包 关闭之后则清除
+        this.checkIfClearLevelScore();
+
         GamePlay.Inst.restart();//退出不扣体力
         GamePlay.Inst.node.active = false;
     }
@@ -299,14 +305,7 @@ export default class Reward extends cc.Component {
 
     onClickClose() {
         //如果是关卡消除红包 关闭之后则清除
-        if (gData.reward.subType == 2) {
-            console.log("清除积分啦啦啦啦啦阿拉拉拉啦--------------------------------", GamePlay.Inst.ifPass)
-            gData.gameData.setProp(GameProp.curTotalScore, 0);
-            GamePlay.Inst.curProgressScore = 0;
-            GamePlay.Inst.curGetScore = 0;
-            GamePlay.Inst.finalGetScore = 0;
-            GamePlay.Inst.initScore();
-        }
+        this.checkIfClearLevelScore();
 
         if (GamePlay.Inst) {
             if (GamePlay.Inst.ifPass) {
@@ -326,4 +325,15 @@ export default class Reward extends cc.Component {
 
         mk.ad.destoryBanner();
     }
+
+    checkIfClearLevelScore() {
+        if (gData.reward.subType == 2) {
+            console.log("清除积分啦啦啦啦啦阿拉拉拉啦--------------------------------", GamePlay.Inst.ifPass)
+            gData.gameData.setProp(GameProp.curTotalScore, 0);
+            GamePlay.Inst.curProgressScore = 0;
+            GamePlay.Inst.curGetScore = 0;
+            GamePlay.Inst.finalGetScore = 0;
+            GamePlay.Inst.initScore();
+        }
+    }
 }

+ 2 - 0
assets/script/game/module/turntable/Turnable.ts

@@ -39,6 +39,7 @@ export default class Turnable extends cc.Component {
     private rewardWeights: number[];
 
     onLoad() {
+        mk.ad.bannerOperOnlyFullScreen(0);
         this.baozhaAni.node.active = false;
         this.initData();
     }
@@ -160,6 +161,7 @@ export default class Turnable extends cc.Component {
     }
 
     onClickClose() {
+        mk.ad.bannerOperOnlyFullScreen(1);
         mk.ad.checkShowInterByChance();
     }
 }

+ 15 - 1
assets/script/mk/system/AdSystem.ts

@@ -108,7 +108,7 @@ export default class AdSystem {
         //广告过后,渲染会有问题,统一下一帧再处理逻辑
         mk.ui.scheduleOnce(() => {
             if (!gData.adData.checkAdMax()) {
-                this.videoAdcallBack(true,request_id);
+                this.videoAdcallBack(true, request_id);
             }
             this.initLastTimeStamp();
         }, 0)
@@ -280,4 +280,18 @@ export default class AdSystem {
             gData.moreGame.popMoreGamePopNode();
         }
     }
+
+    /** banner操作(只是全面屏才操作)
+     * @param operType 0 显示banner 1 销毁banner
+     */
+    public bannerOperOnlyFullScreen(operType: number) {
+        if (cc.winSize.height > 1500) {
+            if (operType == 0) {
+                mk.ad.showBanner();
+            }
+            else if (operType == 1) {
+                mk.ad.destoryBanner();
+            }
+        }
+    }
 }

二進制
build/jsb-link/assets/main/index.jsc


File diff suppressed because it is too large
+ 0 - 0
build/jsb-link/assets/resources/config.json


File diff suppressed because it is too large
+ 0 - 0
build/jsb-link/assets/resources/import/18/18e0b7f8-059f-4a52-9e57-690fe778a31a.json


File diff suppressed because it is too large
+ 0 - 0
build/jsb-link/assets/resources/import/4c/4c49ec9e-c64a-4921-84eb-9bdd737656e5.json


+ 3 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/-1746423203/proj.android-studio.libcocos2dx.iml

@@ -34,9 +34,12 @@
     </content>
     <content url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx">
       <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/resValues/debug" type="java-resource" />
       <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/rs/debug" type="java-resource" />
       <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/src/main/res" type="java-resource" />
       <excludeFolder url="file://$MODULE_DIR$/../../../../../../../../../../Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/.gradle" />

+ 3 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/app/proj.android-studio.EasyEliminate.iml

@@ -42,9 +42,12 @@
       <sourceFolder url="file://$MODULE_DIR$/../../../app/src" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/src/main/assets" type="java-resource" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/debug" type="java-resource" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/debug" type="java-resource" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <excludeFolder url="file://$MODULE_DIR$/../../../app/.gradle" />
       <excludeFolder url="file://$MODULE_DIR$/../../../app/build" />

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

@@ -13,4 +13,4 @@ PACKAGE_NAME=com.aries.qsllx.qxb
 VERSION_NAME=2.0.0
 VERSION_CODE=1000
 TOPON="a611477661e9de,66b742dd0e502b64d783d9c66a9d30c4,b6114779ae072d,b611477b50279c,b6114784ac56bd,b611477f437ccc,b6114781e4401e,b611477d1bce8e"; //巨量渠道topon的 AppId,AppSecreate,激励视频,插屏,信息流,开屏,banner,全屏插屏
-APP_CONFIG_CODE="2.0.0"
+APP_CONFIG_CODE="2.0.1"

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


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

@@ -2253,6 +2253,9 @@ t.showInterAd(0);
 } else gData.moreGame.popMoreGamePopNode();
 }
 };
+t.prototype.bannerOperOnlyFullScreen = function(t) {
+cc.winSize.height > 1500 && (0 == t ? mk.ad.showBanner() : 1 == t && mk.ad.destoryBanner());
+};
 return t;
 }();
 n.default = a;
@@ -8690,6 +8693,7 @@ e.node_changeCellItemUI = null;
 e.node_effectUI = null;
 e.node_levelRedPacketUI = null;
 e.node_touchListenMask = null;
+e.ifOpenLevelRedBag = !1;
 e.curProgressScore = 0;
 e.curGetScore = 0;
 e.targetScore = 0;
@@ -8743,6 +8747,7 @@ configurable: !0
 e.prototype.onLoad = function() {
 n.Inst = this;
 mk.event.register("event_guide", this.clickGuide, this);
+this.checkLevelRedBagSwitch();
 };
 e.prototype.clickGuide = function(t) {
 "1_3" == t ? this.cellItemDic[0][0] && this.cellItemDic[0][0].onClick() : "1_5" == t && this.cellItemDic[1][1] && this.cellItemDic[1][1].onClick();
@@ -8817,6 +8822,10 @@ this.node_bg.setContentSize(new cc.Size(cc.winSize.width, cc.winSize.height));
 var t = gData.gameData.gameStyle.node_top_ui.parent.convertToWorldSpaceAR(gData.gameData.gameStyle.node_top_ui.getPosition()), e = this.node_top.parent.convertToNodeSpaceAR(t);
 this.node_top.y = e.y - 40;
 };
+e.prototype.checkLevelRedBagSwitch = function() {
+var t = gData.gameData.configs.GlobalCfg.levelRedBagSwitch;
+this.ifOpenLevelRedBag = !!t && 0 != t;
+};
 e.prototype.update = function() {
 if (this.curProgressScore >= this.curGetScore) 0 == this.curProgressScore && (this.spr_progress.fillRange = 0); else if (this.curProgressScore >= this.targetScore) {
 this.curProgressScore = this.curGetScore;
@@ -8874,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) {
+if (t >= 1 && !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");
@@ -9208,7 +9217,7 @@ var t = gData.gameData.getProp(f.GameProp.levelNum);
 mk.console.log("[Game]pass passLevelNum", t);
 n.Inst.ifGetPass = !0;
 gData.gameData.setProp(f.GameProp.levelNum, ++t);
-if ("1" == gData.gameData.funOpenData[6]) {
+if (this.ifOpenLevelRedBag) this.gameCount(); else if ("1" == gData.gameData.funOpenData[6]) {
 if (mk.ui.getCurOnPanel("rewardLuck") || this.finalGetScore >= this.targetScore) return;
 this.gameCount();
 console.log("gData.gameData.getProp(GameProp.levelNum)", gData.gameData.getProp(f.GameProp.levelNum));
@@ -9224,7 +9233,11 @@ this.gameOver();
 };
 e.prototype.gameOver = function() {
 mk.data.setTAEventUser(1, "video_play_time", 1);
-mk.ui.openPanel("game/prefab/uiPanel/GameOverUI");
+if (this.ifOpenLevelRedBag) {
+gData.reward.subType = 2;
+mk.ad.videoAdType = f.VideoAdType.LevelScoreRedBag;
+mk.ui.openPanel("module/reward/rewardMission");
+} else mk.ui.openPanel("game/prefab/uiPanel/GameOverUI");
 };
 e.prototype.checkBonusNum = function(t) {
 if (t >= 4) {
@@ -11624,7 +11637,7 @@ value: !0
 n.ServerUrl = n.HttpData = void 0;
 var o, a = function() {
 function t() {
-this.serverType = 1;
+this.serverType = 0;
 }
 t.prototype.getServerUrl = function() {
 switch (this.serverType) {
@@ -15516,7 +15529,9 @@ e.node_tip_anim = null;
 e.anim_btn_cash = null;
 return e;
 }
-e.prototype.onLoad = function() {};
+e.prototype.onLoad = function() {
+mk.ad.bannerOperOnlyFullScreen(0);
+};
 e.prototype.start = function() {
 this.initCashDesc();
 mk.audio.playEffect("pigBank", !1);
@@ -15563,6 +15578,7 @@ return [ 2 ];
 });
 };
 e.prototype.onClickClose = function() {
+mk.ad.bannerOperOnlyFullScreen(1);
 mk.ad.checkShowInterByChance();
 };
 e.prototype.onDestroy = function() {
@@ -17122,73 +17138,121 @@ return i > 3 && r && Object.defineProperty(e, n, r), r;
 Object.defineProperty(n, "__esModule", {
 value: !0
 });
-var r = cc._decorator, c = r.ccclass, s = (r.property, function(t) {
+var r = t("../../module/redBagItem/RedBagItem"), c = cc._decorator, s = c.ccclass, l = (c.property, 
+function(t) {
 a(e, t);
 function e() {
-var e = t.call(this) || this;
-e.ifOpen = !1;
-e.countTime = 300;
-e.storageKey_startCountTime = "startCountTime";
+var e = null !== t && t.apply(this, arguments) || this;
 e.ifInit = !1;
-e.redBagItemArr = [];
-e.curLeftTime = 0;
+e.ifOpen = !1;
+e.isCounting = !1;
+e.countTotalTime = 300;
+e.startRedBagItemArr = [];
+e.curStartLeftTime = 0;
+e.storageKey_startCountEndTime = "startCountEndTime";
+e.levelRedBagItemArr = [];
+e.curLevelLeftTime = 0;
+e.storageKey_levelCountEndTime = "levelCountEndTime";
 return e;
 }
 e.prototype.init = function() {
 if (!this.ifInit) {
-console.log("===[v2.0.1] 初始化");
 this.ifInit = !0;
-this.checkOfflineTime();
-}
-};
-e.prototype.checkOfflineTime = function() {
-var t = new Date().getTime(), e = mk.storage.getStorage(this.storageKey_startCountTime);
-console.log("===[v2.0.1] lastDat", e);
-if (e) {
-var n = Math.floor(.001 * (t - e));
-console.log("===[v2.0.1] gapTime", n);
-var o = Math.floor(this.countTime - n);
-console.log("===[v2.0.1] leftTime", o);
-if (o >= 5) {
-this.curLeftTime = o;
-this.startCountDown(this.curLeftTime);
+this.ifOpen = 0 != gData.gameData.configs.GlobalCfg.redBagLimitSwitch;
+console.log("===[v2.0.1] 初始化 switch", gData.gameData.configs.GlobalCfg.redBagLimitSwitch, gData.gameData.configs.GlobalCfg.levelRedBagSwitch);
+if (this.ifOpen) this.checkOfflineTime(); else {
+mk.storage.setStorage(this.storageKey_startCountEndTime, null);
+mk.storage.setStorage(this.storageKey_levelCountEndTime, null);
 }
 }
 };
-e.prototype.addRedBagItem = function(t) {
-this.redBagItemArr.push(t);
+e.prototype.addRedBagItem = function(t, e) {
+t == r.RedBagItemType.StartUI ? this.startRedBagItemArr.push(e) : t == r.RedBagItemType.LevelUI && this.levelRedBagItemArr.push(e);
 };
-e.prototype.removeRedBagItem = function(t) {
-if (this.redBagItemArr.length >= 1) {
-var e = this.redBagItemArr.indexOf(t);
--1 != e && this.redBagItemArr.splice(e, 1);
+e.prototype.removeRedBagItem = function(t, e) {
+var n = [];
+t == r.RedBagItemType.StartUI ? n = this.startRedBagItemArr : t == r.RedBagItemType.LevelUI && (n = this.levelRedBagItemArr);
+if (n.length > 1) {
+var o = n.indexOf(e);
+-1 != o && n.splice(o, 1);
 }
 };
-e.prototype.startCountDown = function(t) {
-this.curLeftTime = t;
-mk.tip.pop("气泡红包数据开始倒计时");
-var e = new Date().getTime();
-mk.storage.setStorage(this.storageKey_startCountTime, e);
+e.prototype.checkOfflineTime = function() {
+var t = new Date().getTime(), e = mk.storage.getStorage(this.storageKey_startCountEndTime);
+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);
+}
+};
+e.prototype.startCountDown = function(t, e) {
+console.log("===[v2.0.1 type", r.RedBagItemType[t], e);
+if (t == r.RedBagItemType.StartUI) {
+this.curStartLeftTime = e;
+var n = new Date().getTime() + 1e3 * e;
+mk.storage.setStorage(this.storageKey_startCountEndTime, n);
+} else if (t == r.RedBagItemType.LevelUI) {
+this.curLevelLeftTime = e;
+n = new Date().getTime() + 1e3 * e;
+mk.storage.setStorage(this.storageKey_levelCountEndTime, n);
+}
+if (!this.isCounting) {
+this.isCounting = !0;
 this.schedule(this.countDown, 1);
+}
 };
 e.prototype.countDown = function() {
-var t = --this.curLeftTime;
-if (t <= 0) {
-this.curLeftTime = 0;
-this.stopCountDown();
-} else for (var e = mk.time.format(t, "m:s"), n = 0; n < this.redBagItemArr.length; n++) this.redBagItemArr[n].countDown(e);
+if (this.curStartLeftTime > 0) {
+if ((n = --this.curStartLeftTime) <= 0) {
+this.curStartLeftTime = 0;
+this.stopCountDown(r.RedBagItemType.StartUI);
+return;
+}
+for (var t = mk.time.format(n, "m:s"), e = 0; e < this.startRedBagItemArr.length; e++) this.startRedBagItemArr[e].countDown(t);
+}
+if (this.curLevelLeftTime > 0) {
+var n;
+if ((n = --this.curLevelLeftTime) <= 0) {
+this.curLevelLeftTime = 0;
+this.stopCountDown(r.RedBagItemType.LevelUI);
+return;
+}
+for (t = mk.time.format(n, "m:s"), e = 0; e < this.levelRedBagItemArr.length; e++) this.levelRedBagItemArr[e].countDown(t);
+}
 };
-e.prototype.stopCountDown = function() {
+e.prototype.stopCountDown = function(t) {
+if (t == r.RedBagItemType.StartUI) {
+for (var e = 0; e < this.startRedBagItemArr.length; e++) this.startRedBagItemArr[e].stopCountDown();
+mk.storage.setStorage(this.storageKey_startCountEndTime, null);
+} else if (t == r.RedBagItemType.LevelUI) {
+for (e = 0; e < this.levelRedBagItemArr.length; e++) this.levelRedBagItemArr[e].stopCountDown();
+mk.storage.setStorage(this.storageKey_levelCountEndTime, null);
+}
+if (this.curStartLeftTime <= 0 && this.curLevelLeftTime <= 0) {
+this.isCounting = !1;
 this.unschedule(this.countDown);
-for (var t = 0; t < this.redBagItemArr.length; t++) this.redBagItemArr[t].stopCountDown();
+}
+};
+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() {};
 e.prototype.showNewTip = function() {};
-return i([ c ], e);
+return i([ s ], e);
 }(cc.Component));
-n.default = s;
+n.default = l;
 cc._RF.pop();
-}, {} ],
+}, {
+"../../module/redBagItem/RedBagItem": "RedBagItem"
+} ],
 RedBagItem: [ function(t, e, n) {
 "use strict";
 cc._RF.push(e, "c9bb30R/BdEr6tpJ3Ssv0K4", "RedBagItem");
@@ -17326,13 +17390,20 @@ done: !0
 Object.defineProperty(n, "__esModule", {
 value: !0
 });
-var s = t("../../../mk/system/UISystem"), l = cc._decorator, u = l.ccclass, p = l.property, d = function(t) {
+n.RedBagItemType = void 0;
+var s, l = t("../../../mk/system/UISystem");
+(function(t) {
+t[t.StartUI = 0] = "StartUI";
+t[t.LevelUI = 1] = "LevelUI";
+})(s = n.RedBagItemType || (n.RedBagItemType = {}));
+var u = cc._decorator, p = u.ccclass, d = u.property, h = function(t) {
 a(e, t);
 function e() {
 var e = null !== t && t.apply(this, arguments) || this;
 e.label_tip = null;
 e.node_qipaoBg = null;
 e.node_tip = null;
+e.type = 0;
 e.index = 0;
 e.onComplete = [];
 e.stroageKey = "";
@@ -17343,13 +17414,17 @@ this.node.on(cc.Node.EventType.TOUCH_START, this.onClick, this);
 this.init();
 };
 e.prototype.init = function() {
+var t = this;
 gData.redBagData.init();
 this.stroageKey = "RedBagItem" + this.index;
-var t = mk.storage.getStorage(this.stroageKey);
-if (t && 1 == t) this.hide(); else {
-console.log("===[v2.0.1]", "RedBagItem active" + this.node.active + "inxdex:" + this.index);
-gData.redBagData.addRedBagItem(this);
-}
+var e = mk.time.getNowDayString(new Date().getTime()), n = mk.time.getNowDayString(1e3 * gData.gameData.gameData.lastTime);
+console.log("===[v2.0.1] curDate != lastDate", "curDate:" + e, "lastDate:" + n, "curDate != lastDate:" + e != n);
+e != n && mk.storage.setStorage(this.stroageKey, 0);
+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);
 };
 e.prototype.reset = function() {
 mk.storage.setStorage(this.stroageKey, 0);
@@ -17359,8 +17434,7 @@ return r(this, void 0, void 0, function() {
 return c(this, function(t) {
 switch (t.label) {
 case 0:
-console.log("===[v2.0.1] 点击点击");
-return gData.redBagData.ifOpen ? [ 3, 2 ] : [ 4, mk.ui.openPanel("module/reward/rewardLuck", s.OpenActionType.normal) ];
+return gData.redBagData.ifOpen ? [ 3, 2 ] : [ 4, mk.ui.openPanel("module/reward/rewardLuck", l.OpenActionType.normal) ];
 
 case 1:
 t.sent();
@@ -17368,19 +17442,25 @@ this.callBack();
 return [ 3, 4 ];
 
 case 2:
-if (gData.redBagData.curLeftTime >= 1) {
+if (this.type == s.StartUI) {
+if (gData.redBagData.curStartLeftTime >= 1) {
+mk.tip.pop("请等待倒计时结束之后领取红包");
+return [ 2 ];
+}
+} else if (this.type == s.LevelUI && gData.redBagData.curLevelLeftTime >= 1) {
 mk.tip.pop("请等待倒计时结束之后领取红包");
 return [ 2 ];
 }
-return [ 4, mk.ui.openPanel("module/reward/rewardLuck", s.OpenActionType.normal) ];
+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);
-gData.redBagData.startCountDown(gData.redBagData.countTime);
+gData.redBagData.removeRedBagItem(this.type, this);
+gData.redBagData.startCountDown(this.type, gData.redBagData.countTotalTime);
+gData.redBagData.showTip(this.type);
 t.label = 4;
 
 case 4:
@@ -17389,6 +17469,9 @@ return [ 2 ];
 });
 });
 };
+e.prototype.callBack = function() {
+for (var t = this.onComplete.length, e = 0; e < t; e++) this.onComplete[e].handler && this.onComplete[e].emit([]);
+};
 e.prototype.countDown = function(t) {
 this.label_tip.string = t;
 this.node.color = cc.Color.GRAY;
@@ -17400,24 +17483,29 @@ this.node.color = cc.Color.WHITE;
 this.node_qipaoBg.color = cc.Color.WHITE;
 };
 e.prototype.hide = function() {
+console.log("==[v2.0.1 index :" + this.index, "隐藏");
 this.node.active = !1;
 this.node_tip.active && (this.node_tip.active = !1);
 };
-e.prototype.callBack = function() {
-for (var t = this.onComplete.length, e = 0; e < t; e++) this.onComplete[e].handler && this.onComplete[e].emit([]);
+e.prototype.showTip = function() {
+this.node_tip.active = !0;
 };
-i([ p(cc.Label) ], e.prototype, "label_tip", void 0);
-i([ p(cc.Node) ], e.prototype, "node_qipaoBg", void 0);
-i([ p(cc.Node) ], e.prototype, "node_tip", void 0);
-i([ p(cc.Integer) ], e.prototype, "index", void 0);
-i([ p({
+i([ d(cc.Label) ], e.prototype, "label_tip", void 0);
+i([ d(cc.Node) ], e.prototype, "node_qipaoBg", void 0);
+i([ d(cc.Node) ], e.prototype, "node_tip", void 0);
+i([ d({
+type: cc.Enum(s),
+displayName: "气泡红包类型"
+}) ], e.prototype, "type", void 0);
+i([ d(cc.Integer) ], e.prototype, "index", void 0);
+i([ d({
 displayName: "点击回调",
 tooltip: "点击时触发",
 type: cc.Component.EventHandler
 }) ], e.prototype, "onComplete", void 0);
-return i([ u ], e);
+return i([ p ], e);
 }(cc.Component);
-n.default = d;
+n.default = h;
 cc._RF.pop();
 }, {
 "../../../mk/system/UISystem": "UISystem"
@@ -18471,9 +18559,11 @@ mk.ui.closePanel(this.node.name);
 mk.ui.openPanel("module/redBagCash/redBagCash");
 };
 e.prototype.clickNextMission = function() {
+this.checkIfClearLevelScore();
 l.default.Inst.nextLevel();
 };
 e.prototype.clickBack = function() {
+this.checkIfClearLevelScore();
 l.default.Inst.restart();
 l.default.Inst.node.active = !1;
 };
@@ -18481,6 +18571,12 @@ e.prototype.onDestroy = function() {
 this.cur_stage === s.none && mk.audio.playEffect("rewardClose");
 };
 e.prototype.onClickClose = function() {
+this.checkIfClearLevelScore();
+l.default.Inst && l.default.Inst.ifPass ? l.default.Inst.gameCount() : mk.ad.checkShowInterByChance();
+this.hasWatchVideo || gData.adData.checkShowFullInter(2);
+mk.ad.destoryBanner();
+};
+e.prototype.checkIfClearLevelScore = function() {
 if (2 == gData.reward.subType) {
 console.log("清除积分啦啦啦啦啦阿拉拉拉啦--------------------------------", l.default.Inst.ifPass);
 gData.gameData.setProp(p.GameProp.curTotalScore, 0);
@@ -18489,9 +18585,6 @@ l.default.Inst.curGetScore = 0;
 l.default.Inst.finalGetScore = 0;
 l.default.Inst.initScore();
 }
-l.default.Inst && l.default.Inst.ifPass ? l.default.Inst.gameCount() : mk.ad.checkShowInterByChance();
-this.hasWatchVideo || gData.adData.checkShowFullInter(2);
-mk.ad.destoryBanner();
 };
 i([ f({
 displayName: "红包类型",
@@ -23245,6 +23338,7 @@ e.perMinus = 0;
 return e;
 }
 e.prototype.onLoad = function() {
+mk.ad.bannerOperOnlyFullScreen(0);
 this.baozhaAni.node.active = !1;
 this.initData();
 };
@@ -23351,6 +23445,7 @@ this.playOver();
 };
 e.prototype.onDestroy = function() {};
 e.prototype.onClickClose = function() {
+mk.ad.bannerOperOnlyFullScreen(1);
 mk.ad.checkShowInterByChance();
 };
 i([ f(cc.Node) ], e.prototype, "node_turn", void 0);

+ 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": 1638769023334,
-    "genTime": 1638769023334,
+    "buildTime": 1638845964267,
+    "genTime": 1638845964267,
     "genVersion": null
 }

Some files were not shown because too many files changed in this diff