dzduole 3 tygodni temu
rodzic
commit
8d6ebf1255

+ 0 - 1
art/fgui/.objs/metas/isxx5ak7/kt443qc.info

@@ -12,7 +12,6 @@
       "hidden": true
     },
     "n77_vhzh": {
-      "collapsed": true,
       "locked": true,
       "hidden": true
     },

+ 76 - 22
client/laya/bin/js/bundle.js

@@ -1150,23 +1150,23 @@
             }, "testAsyncCallback", JSON.stringify(reqObj));
         }
         showInternAd(mark) {
+            console.log('zh:showInternAd start');
             if (!Laya.Browser.onAndroid) {
-                console.log('zh:非android dev');
+                console.log('zh:showInternAd 非android dev');
                 return false;
             }
             if (!this.initBridge()) {
                 return false;
             }
             let rs = this.bridge.call("showInternAd", mark);
-            console.log('zh:showInternAd rs= ' + rs + '   ,mark=' + mark);
             try {
                 const result = JSON.parse(rs);
                 if (result.code === 200) {
-                    console.log("zh:广告显示成功");
+                    console.log("zh:showInternAd OK");
                     return true;
                 }
                 else {
-                    console.warn("zh:广告显示失败:", result.msg);
+                    console.warn("zh:showInternAd  FAILL:", result.msg);
                     return false;
                 }
             }
@@ -1277,8 +1277,9 @@
         onOpenBox() {
             this.boxNum++;
             if (this.boxNum < this.boxMax) {
-                if (PlatMgr.getRand() < PlatMgr.boxInsertRate)
-                    Moyu.showInsertAd(0, PlatMgr.insertGap);
+                if (PlatMgr.getRand() < PlatMgr.boxInsertRate) {
+                    JSBridgeUtils.instance.showInternAd('uivideoshare_show');
+                }
             }
             else if (this.boxNum == this.boxMax) {
                 if (PlatMgr.getRand() < PlatMgr.boxVideoRate) {
@@ -1443,8 +1444,10 @@
                 return true;
             }
             else {
-                if (this.rand100(this.fullVideoRate))
-                    Moyu.showInsertAd(0, 0, 'full');
+                if (this.rand100(this.fullVideoRate)) {
+                    console.log('zh:插屏 ad start');
+                    JSBridgeUtils.instance.showInternAd('platMgr');
+                }
                 return false;
             }
         }
@@ -1457,13 +1460,15 @@
         static showInsert(delay = false) {
             if (this.getRand() < this.insertRate) {
                 let dt = delay ? this.insertDelay : 0;
-                Moyu.showInsertAd(dt, this.insertGap);
+                console.log('zh:插屏 ad start');
+                JSBridgeUtils.instance.showInternAd('gameInsert');
             }
         }
         static gameInsert() {
-            if (this.getRand() < this.gameInsertRate) {
-                console.log('zh:  游戏中插屏 hhhhhhhhhhhhhhhhhh');
-                Moyu.showInsertAd(xGame.tools.random(2000, 5100), this.insertGap);
+            let t = this.getRand();
+            let r = this.gameInsertRate;
+            if (t < r) {
+                console.log('zh:插屏 ad start 游戏中每回合开始插屏 t: %d, r: %d', t, r);
             }
         }
         static showRateBanner() {
@@ -1471,6 +1476,10 @@
                 this.showBanner(true, this.bannerDelay, 3000);
         }
         static showBanner(show, delay = 0, hide = 0) {
+            if (2 > 1) {
+                console.log('zh:显示showBanner广告 直接返回');
+                return;
+            }
             if (!show)
                 Moyu.showBannerAd(false);
             else {
@@ -1484,6 +1493,10 @@
             }
         }
         static bannerShow(show) {
+            if (2 > 1) {
+                console.log('zh:显示showBanner广告 直接返回');
+                return;
+            }
             Moyu.showBannerAd(show);
             console.log("showBanner" + show);
         }
@@ -6243,6 +6256,7 @@
             }
         }
         enterGame(type) {
+            console.log('zh: 进入经典模式 type: ' + type);
             xGame.common.classicRoomType = type;
             let cfg = cfgTable.modeselectData[type];
             let need = cfg.need;
@@ -6642,9 +6656,13 @@
             if (guide == 1) {
                 let randTime = xGame.common.randomNum(300, 800);
                 if (this.firstEnter) {
+                    console.log("zh: firstEnter");
                     this.firstEnter = false;
                     randTime += 900;
                 }
+                else {
+                    console.log("zh: no firstEnter");
+                }
                 Laya.timer.once(randTime, this, () => {
                     xGame.common.autoPopUIView();
                 });
@@ -6658,9 +6676,13 @@
             this.ui.enterGuide.visible = false;
             this.ui.secretaryGuide.visible = guide == 0;
             if (guide == 0) {
+                console.log("zh:显示引导");
                 xGame.soundMgr.playSound("s_guide");
                 xGame.common.showGirlTalkPop(16, this.ui.talkNode, this.ui.talkNode.womanTxt);
             }
+            else {
+                console.log("zh:不需要显示引导");
+            }
         }
         ensureSecretary() {
             console.log('zh: ensureSecretary   ensureSecretaryensureSecretaryensureSecretaryensureSecretaryensureSecretary');
@@ -6703,7 +6725,16 @@
             }
         }
         beginGame(isNice = false) {
-            console.log('zh:beginGame beginGame beginGame');
+            console.log('zh:beginGame ');
+            let guide = DataMgr.getSkillGuide();
+            if (guide == 1) {
+                console.log('zh:非新手引导,showInternAd  ');
+                JSBridgeUtils.instance.showInternAd('beginGame');
+            }
+            else {
+                console.log('zh:新手引导,不显示AD  ');
+            }
+            console.log('zh:beginGame 2 go');
             if (xGame.common.gameMode == GameMode.classic) {
                 if (isNice) {
                     this.enterClassic();
@@ -7000,17 +7031,19 @@
                 });
             });
             if (this.success) {
+                JSBridgeUtils.instance.showInternAd('gameend_success');
+                console.log('zh:game end 成功');
                 xGame.soundMgr.playSound('slots_roll01');
                 xGame.soundMgr.playSound("s_win");
                 xGame.common.showGirlTalkPop(8, this.ui.talkNode, this.ui.talkNode.womanTxt);
             }
             else {
+                JSBridgeUtils.instance.showInternAd('gameend_faill');
+                console.log('zh:game end失败');
                 xGame.soundMgr.playSound('matchwin01');
                 xGame.soundMgr.playSound("s_lose");
                 xGame.common.showGirlTalkPop(9, this.ui.talkNode, this.ui.talkNode.womanTxt);
             }
-            if (!Moyu.isLegal)
-                PlatMgr.showBanner(true);
             let challengeNum = DataMgr.getChallengeTimes();
             if (xGame.common.gameMode == GameMode.classic && challengeNum >= 1 && challengeNum <= 3) {
                 DataMgr.setChallengeTimes(1);
@@ -7263,7 +7296,7 @@
             this.ui.myNode.screenNode.screenImg.displayObject.y = this.ui.myNode.screenNode.screenImg.y + this.ui.myNode.screenNode.screenImg.height * 0.5;
             this.success = success;
             let time = xGame.common.randomNum(600, 1500);
-            Moyu.showInsertAd(time, 60000);
+            JSBridgeUtils.instance.showInternAd('uivideoshare_show');
             if (success)
                 xGame.soundMgr.playSound("applause");
             this.ui.t0.play();
@@ -8300,7 +8333,7 @@
             xGame.common.d2World.rootBall.showSelf();
             this.clearIceSkill();
             if (this.selfTurn) {
-                console.log("gameResult");
+                console.log("zh:处理一杆结束后的逻辑  gameResult");
                 PlatMgr.gameInsert();
             }
             xGame.common.d3World.knifeRoot.destroyChildren();
@@ -18796,17 +18829,19 @@
                 });
             });
             if (this.success) {
+                JSBridgeUtils.instance.showInternAd('gameend_success');
+                console.log('zh:game end 成功');
                 xGame.soundMgr.playSound('slots_roll01');
                 xGame.soundMgr.playSound("s_win");
                 xGame.common.showGirlTalkPop(8, this.ui.talkNode, this.ui.talkNode.womanTxt);
             }
             else {
+                JSBridgeUtils.instance.showInternAd('gameend_faill');
+                console.log('zh:game end失败');
                 xGame.soundMgr.playSound('matchwin01');
                 xGame.soundMgr.playSound("s_lose");
                 xGame.common.showGirlTalkPop(9, this.ui.talkNode, this.ui.talkNode.womanTxt);
             }
-            if (!Moyu.isLegal)
-                PlatMgr.showBanner(true);
             let challengeNum = DataMgr.getChallengeTimes();
             if (xGame.common.gameMode == GameMode.classic && challengeNum >= 1 && challengeNum <= 3) {
                 DataMgr.setChallengeTimes(1);
@@ -20884,6 +20919,7 @@
             }
         }
         enterGame(type) {
+            console.log('zh: 进入经典模式 type: ' + type);
             xGame.common.classicRoomType = type;
             let cfg = cfgTable.modeselectData[type];
             let need = cfg.need;
@@ -21138,8 +21174,9 @@
         onOpenBox() {
             this.boxNum++;
             if (this.boxNum < this.boxMax) {
-                if (PlatMgr.getRand() < PlatMgr.boxInsertRate)
-                    Moyu.showInsertAd(0, PlatMgr.insertGap);
+                if (PlatMgr.getRand() < PlatMgr.boxInsertRate) {
+                    JSBridgeUtils.instance.showInternAd('uivideoshare_show');
+                }
             }
             else if (this.boxNum == this.boxMax) {
                 if (PlatMgr.getRand() < PlatMgr.boxVideoRate) {
@@ -21361,9 +21398,13 @@
             if (guide == 1) {
                 let randTime = xGame.common.randomNum(300, 800);
                 if (this.firstEnter) {
+                    console.log("zh: firstEnter");
                     this.firstEnter = false;
                     randTime += 900;
                 }
+                else {
+                    console.log("zh: no firstEnter");
+                }
                 Laya.timer.once(randTime, this, () => {
                     xGame.common.autoPopUIView();
                 });
@@ -21377,9 +21418,13 @@
             this.ui.enterGuide.visible = false;
             this.ui.secretaryGuide.visible = guide == 0;
             if (guide == 0) {
+                console.log("zh:显示引导");
                 xGame.soundMgr.playSound("s_guide");
                 xGame.common.showGirlTalkPop(16, this.ui.talkNode, this.ui.talkNode.womanTxt);
             }
+            else {
+                console.log("zh:不需要显示引导");
+            }
         }
         ensureSecretary() {
             console.log('zh: ensureSecretary   ensureSecretaryensureSecretaryensureSecretaryensureSecretaryensureSecretary');
@@ -21422,7 +21467,16 @@
             }
         }
         beginGame(isNice = false) {
-            console.log('zh:beginGame beginGame beginGame');
+            console.log('zh:beginGame ');
+            let guide = DataMgr.getSkillGuide();
+            if (guide == 1) {
+                console.log('zh:非新手引导,showInternAd  ');
+                JSBridgeUtils.instance.showInternAd('beginGame');
+            }
+            else {
+                console.log('zh:新手引导,不显示AD  ');
+            }
+            console.log('zh:beginGame 2 go');
             if (xGame.common.gameMode == GameMode.classic) {
                 if (isNice) {
                     this.enterClassic();

Plik diff jest za duży
+ 0 - 0
client/laya/bin/js/bundle.js.map


+ 1 - 1
client/laya/src/game/GameMgr.ts

@@ -1065,7 +1065,7 @@ export default class GameMgr {
         //清除冰冻效果
         this.clearIceSkill();
         if (this.selfTurn) {
-            console.log("gameResult");
+            console.log("zh:处理一杆结束后的逻辑  gameResult");
             PlatMgr.gameInsert();
         }
         //

+ 91 - 91
client/laya/src/game/PlatMgr.ts

@@ -2,7 +2,7 @@ import DataMgr from "../data/DataMgr";
 import UIBox from "../ui/UIBox";
 import UITry from "../ui/UITry";
 import { xGame } from "../xGame";
-
+import JSBridgeUtils from "../utils/JSBridgeUtils";
 export default class PlatMgr {
 
     /**
@@ -13,189 +13,189 @@ export default class PlatMgr {
     /**
      * 普通签到替换成视频概率
      */
-    public static signAdRate:number=0;
+    public static signAdRate: number = 0;
 
     /**
      * 视频强弹概率
      */
-    public static forceVideoRate:number=0;
+    public static forceVideoRate: number = 0;
     /**
      * 视频强弹间隔(毫秒)
      */
-    public static forceVideoGap:number=0;
+    public static forceVideoGap: number = 0;
 
     /**
      * 在无视频后概率出全屏
      */
-    public static fullVideoRate:number=0;
+    public static fullVideoRate: number = 0;
 
     /**
      * 游戏中插屏出现概率(点击)
      */
-    public static gameInsertRate:number=0;
+    public static gameInsertRate: number = 0;
     /**
      * 插屏出现间隔
      */
-    public static insertGap:number=0;
+    public static insertGap: number = 0;
     /**
      * 二级页面插屏出现延迟(毫秒)
      */
-    public static insertDelay:number=0;
+    public static insertDelay: number = 0;
 
     /**
      * 二级页面插屏出现概率
      */
-    public static insertRate:number=0;
+    public static insertRate: number = 0;
 
     /**
      * 宝箱出现概率
      */
-    public static boxRate:number=0;
+    public static boxRate: number = 0;
     /**
      * 宝箱点满出现视频概率
      */
-    public static boxVideoRate:number=0;
+    public static boxVideoRate: number = 0;
     /**
      * 宝箱点击出现插屏概率(受插屏间隔影响)
      */
-    public static boxInsertRate:number=0;
+    public static boxInsertRate: number = 0;
     /**
      * 宝箱点击放弃出现banner概率
      */
-    public static boxBannerRate:number=0;
+    public static boxBannerRate: number = 0;
 
     /**
      * 试用出现概率
      */
-    public static tryRate:number=0;
+    public static tryRate: number = 0;
     /**
      * 试用需要关闭3次的概率
      */
-    public static tryClose3Rate:number=0;
+    public static tryClose3Rate: number = 0;
     /**
      * 放弃试用进视频的概率
      */
-    public static tryVideoRate:number=0;
-    
+    public static tryVideoRate: number = 0;
+
     /**
      * 误点banner出现概率
      */
-    public static bannerRate:number=0;
+    public static bannerRate: number = 0;
     /**
      * 误点banner出现延迟
      */
-    public static bannerDelay:number;
+    public static bannerDelay: number;
 
 
 
     /**
      * 最后一次强弹视频的时间
      */
-    private static lastVt:number=0;
+    private static lastVt: number = 0;
 
-    public static initConfig() 
-    {
-        this.lastVt=0;
-        if (!Moyu.platConfig) 
+    public static initConfig() {
+        this.lastVt = 0;
+        if (!Moyu.platConfig)
             return;
-        for(let k in Moyu.platConfig)
-        {
-            let pd=this[k];
-            let pc=Moyu.platConfig[k];
-            if(pd!=undefined && pc!=undefined)
-                this[k]=pc;
+        for (let k in Moyu.platConfig) {
+            let pd = this[k];
+            let pc = Moyu.platConfig[k];
+            if (pd != undefined && pc != undefined)
+                this[k] = pc;
         }
         Moyu.setBannerPos(0.5, 1);
     }
-    static rand100(num:number)
-    {
-        return xGame.tools.random(0,100)<num;
+    static rand100(num: number) {
+        return xGame.tools.random(0, 100) < num;
     }
-    public static isMisVideo()
-    {
-        let dt=Laya.timer.currTimer-this.lastVt;
-        if(dt>this.forceVideoGap && this.rand100(this.forceVideoRate))
-        {
-            this.lastVt=Laya.timer.currTimer;
+    public static isMisVideo() {
+        let dt = Laya.timer.currTimer - this.lastVt;
+        if (dt > this.forceVideoGap && this.rand100(this.forceVideoRate)) {
+            this.lastVt = Laya.timer.currTimer;
             return true;
         }
-        else
-        {
+        else {
             //全屏
-            if(this.rand100(this.fullVideoRate))
-                Moyu.showInsertAd(0,0,'full');
+            if (this.rand100(this.fullVideoRate)) {
+                console.log('zh:插屏 ad start');
+                // Moyu.showInsertAd(0, 0, 'full');
+                JSBridgeUtils.instance.showInternAd('platMgr');
+            }
             return false;
         }
     }
-    public static showVideo(call,type)
-    {
-        Moyu.showVideoAd(()=>{
-            this.lastVt=Laya.timer.currTimer;
-            call&&call();
-        },type)
+    public static showVideo(call, type) {
+        Moyu.showVideoAd(() => {
+            this.lastVt = Laya.timer.currTimer;
+            call && call();
+        }, type)
     }
-    public static showInsert(delay=false)
-    {
-        if(this.getRand()<this.insertRate)
-        {
-            let dt=delay?this.insertDelay:0;
-            Moyu.showInsertAd(dt,this.insertGap);
+    public static showInsert(delay = false) {
+        if (this.getRand() < this.insertRate) {
+            let dt = delay ? this.insertDelay : 0;
+            //Moyu.showInsertAd(dt,this.insertGap);
+            console.log('zh:插屏 ad start');
+            JSBridgeUtils.instance.showInternAd('gameInsert');
         }
     }
     /**
      * 游戏中每回合开始插屏
      */
-    public static gameInsert()
-    {
-        if(this.getRand()<this.gameInsertRate)
-        {
-            console.log('zh:  游戏中插屏 hhhhhhhhhhhhhhhhhh')
-            Moyu.showInsertAd(xGame.tools.random(2000,5100),this.insertGap);
-            //zh:todo 此处可以不接aad
+    public static gameInsert() {
+        let t = this.getRand();
+        let r = this.gameInsertRate;
+        if (t < r) {
+            console.log('zh:插屏 ad start 游戏中每回合开始插屏 t: %d, r: %d', t, r);
+            // Moyu.showInsertAd(xGame.tools.random(2000,5100),this.insertGap);
+            ///JSBridgeUtils.instance.showInternAd('gameInsert');
         }
     }
-    public static showRateBanner()
-    {
-        if(this.getRand()<this.bannerRate)
-            this.showBanner(true,this.bannerDelay,3000);
+    public static showRateBanner() {
+        if (this.getRand() < this.bannerRate)
+            this.showBanner(true, this.bannerDelay, 3000);
     }
-    public static showBanner(show:boolean,delay=0,hide=0)
-    {
-        if(!show)
+    public static showBanner(show: boolean, delay = 0, hide = 0) {
+        //zh:
+        if (2 > 1) {
+            console.log('zh:显示showBanner广告 直接返回');
+            return;
+        }
+        if (!show)
             Moyu.showBannerAd(false);
-        else
-        {
-            Laya.timer.clear(this,this.bannerShow); 
-            if(delay>0)
-                Laya.timer.once(delay,this,this.bannerShow,[true]);
+        else {
+            Laya.timer.clear(this, this.bannerShow);
+            if (delay > 0)
+                Laya.timer.once(delay, this, this.bannerShow, [true]);
             else
                 this.bannerShow(true);
-            if(hide>0)
-                Laya.timer.once(hide,this,this.bannerShow,[false]);
-        } 
+            if (hide > 0)
+                Laya.timer.once(hide, this, this.bannerShow, [false]);
+        }
     }
-    static bannerShow(show)
-    {
+    static bannerShow(show) {
+
+        if (2 > 1) {
+            console.log('zh:显示showBanner广告 直接返回');
+            return;
+        }
+
         Moyu.showBannerAd(show);
-        console.log("showBanner"+show);
+        console.log("showBanner" + show);
     }
-    public static getRand()
-    {
-        return xGame.tools.random(0,100);
+    public static getRand() {
+        return xGame.tools.random(0, 100);
     }
-    public static openBox()
-    {
+    public static openBox() {
         // this.boxRate=100;
-        if(this.getRand()<this.boxRate)
+        if (this.getRand() < this.boxRate)
             xGame.uiMgr.Show(UIBox);
     }
-    public static openTry()
-    { 
-        if(Laya.timer.currTimer<DataMgr.gameData.tryTime)
+    public static openTry() {
+        if (Laya.timer.currTimer < DataMgr.gameData.tryTime)
             return;
-        if(this.getRand()<this.tryRate)
+        if (this.getRand() < this.tryRate)
             xGame.uiMgr.Show(UITry);
-        else if(DataMgr.gameData.gameCount==1)
+        else if (DataMgr.gameData.gameCount == 1)
             xGame.uiMgr.Show(UITry);
     }
 }

+ 1 - 1
client/laya/src/game/SkillMgr.ts

@@ -59,7 +59,7 @@ export default class SkillMgr {
             }
             //
         }
-        if (guide == 0) {
+        if (guide == 0) {//已经引导过了,下次不需要引导了
             DataMgr.setSkillGuide(1);
             if (DataMgr.getNewUser()) {
                 Moyu.sendDataEvent("gameFirstPlay");

+ 4 - 7
client/laya/src/ui/UIBox.ts

@@ -59,8 +59,10 @@ export default class UIBox extends UIBase {
     onOpenBox() {
         this.boxNum++;
         if (this.boxNum < this.boxMax) {
-            if (PlatMgr.getRand() < PlatMgr.boxInsertRate)
-                Moyu.showInsertAd(0, PlatMgr.insertGap);
+            if (PlatMgr.getRand() < PlatMgr.boxInsertRate){
+             //    Moyu.showInsertAd(0, PlatMgr.insertGap);
+                 JSBridgeUtils.instance.showInternAd('uivideoshare_show');
+            }  
         }
         else if (this.boxNum == this.boxMax) {
             if (PlatMgr.getRand() < PlatMgr.boxVideoRate) {
@@ -71,8 +73,6 @@ export default class UIBox extends UIBase {
                 this.getAward();
         }
         else if (this.inAd) {
-
-
             console.log('zh:qjff_AD_for_UIBOX_onOpenBox')
             // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
             // JSBridgeUtils.instance.showRewardAd('xxxxx');
@@ -84,9 +84,6 @@ export default class UIBox extends UIBase {
                 console.log('zh:AD 失败,直接发放奖励')
                 this.qjff_AD_for_UIBOX_onOpenBox();
             }
-
-
-
             // Moyu.showVideoAd(() => {
             //     this.getAward();
             // }, EAdType.box);

+ 9 - 2
client/laya/src/ui/UIGameEnd.ts

@@ -215,18 +215,25 @@ export default class UIGameEnd extends UIBase {
         })
         //
         if (this.success) {
+            JSBridgeUtils.instance.showInternAd('gameend_success');
             //成功
+            console.log('zh:game end 成功');
             xGame.soundMgr.playSound('slots_roll01');
             xGame.soundMgr.playSound("s_win");
             xGame.common.showGirlTalkPop(8, this.ui.talkNode, this.ui.talkNode.womanTxt);
         }
         else {
+
+
+            JSBridgeUtils.instance.showInternAd('gameend_faill');
+
             //失败
+            console.log('zh:game end失败');
             xGame.soundMgr.playSound('matchwin01');
             xGame.soundMgr.playSound("s_lose");
             xGame.common.showGirlTalkPop(9, this.ui.talkNode, this.ui.talkNode.womanTxt);
         }
-        if (!Moyu.isLegal) PlatMgr.showBanner(true);
+        //if (!Moyu.isLegal) PlatMgr.showBanner(true);
         //////
         let challengeNum = DataMgr.getChallengeTimes();
         if (xGame.common.gameMode == GameMode.classic && challengeNum >= 1 && challengeNum <= 3) {
@@ -448,7 +455,7 @@ export default class UIGameEnd extends UIBase {
                     // JSBridgeUtils.instance.showRewardAd('xxxxx');
 
                     //需要传递参数
-                    Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+                    Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level + '');
                     if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiGameEnd')) {
 
 

+ 30 - 17
client/laya/src/ui/UIMain.ts

@@ -157,7 +157,7 @@ export default class UIMain extends UIBase {
         let curUse = DataMgr.getCurSecretary();
         this.changeSecretary(curUse);
         //
-        this.ui.rankBtn.visible=false;
+        this.ui.rankBtn.visible = false;
         this.ui.talkNode.visible = false;
         let guide = DataMgr.getSkillGuide();
         if (xGame.common.isNewDay && guide == 1) {
@@ -223,7 +223,7 @@ export default class UIMain extends UIBase {
         //
         this.addUIClick(this.ui.signBtn, this.openSignView);
         this.addUIClick(this.ui.drawBtn, this.openDrawView);
-       // this.addUIClick(this.ui.rankBtn, this.openRanking);
+        // this.addUIClick(this.ui.rankBtn, this.openRanking);
 
     }
     public show(showFailWords): void {
@@ -231,10 +231,10 @@ export default class UIMain extends UIBase {
         //
         this.moneyNode.ui.c1.selectedIndex = 1;
         this.playSecretaryIdle();
-      
+
         xGame.soundMgr.playMusic("caromhall01", 0);
-      
-  
+
+
         Laya.timer.clearAll(this);
         this.playSecretaryRandomSound();
         console.log('zh:uimain.ts   show  show FailWords=', showFailWords);
@@ -271,8 +271,11 @@ export default class UIMain extends UIBase {
         if (guide == 1) {
             let randTime = xGame.common.randomNum(300, 800);
             if (this.firstEnter) {
+                console.log("zh: firstEnter");
                 this.firstEnter = false;
                 randTime += 900;
+            } else {
+                console.log("zh: no firstEnter");
             }
             Laya.timer.once(randTime, this, () => {
                 xGame.common.autoPopUIView();
@@ -291,8 +294,11 @@ export default class UIMain extends UIBase {
         this.ui.enterGuide.visible = false;
         this.ui.secretaryGuide.visible = guide == 0;
         if (guide == 0) {
+            console.log("zh:显示引导");
             xGame.soundMgr.playSound("s_guide");
             xGame.common.showGirlTalkPop(16, this.ui.talkNode, this.ui.talkNode.womanTxt);
+        } else {
+            console.log("zh:不需要显示引导");
         }
     }
     ensureSecretary() {
@@ -320,8 +326,8 @@ export default class UIMain extends UIBase {
     }
     startGame(type: GameMode) {
 
-      //  console.log('zh: 停止播放主頁面背景音乐');
-       // xGame.soundMgr.stopMusic();
+        //  console.log('zh: 停止播放主頁面背景音乐');
+        // xGame.soundMgr.stopMusic();
 
 
         //进入游戏页面
@@ -348,15 +354,22 @@ export default class UIMain extends UIBase {
     }
     beginGame(isNice = false) {
 
-        console.log('zh:beginGame beginGame beginGame');
-
-
-        //
+        console.log('zh:beginGame ');
+        //TODO:ZH 插屏AD
         //let time = xGame.common.randomNum(1000, 2000);
         //Moyu.showInsertAd(time, 60000);
-        //
+
+        let guide = DataMgr.getSkillGuide();
+        if (guide == 1) {//非新手引导,就显示,否则不显示
+            console.log('zh:非新手引导,showInternAd  ');
+            JSBridgeUtils.instance.showInternAd('beginGame');
+        } else {
+            console.log('zh:新手引导,不显示AD  ');
+        }
+
+
+        console.log('zh:beginGame 2 go');
         if (xGame.common.gameMode == GameMode.classic) {
-            //
             if (isNice) {
                 //巅峰赛直接进入
                 this.enterClassic();
@@ -400,7 +413,7 @@ export default class UIMain extends UIBase {
     }
     startPlaceBall() {
 
-     
+
         xGame.uiMgr.Show(UILevelDisplay);
         //xGame.uiMgr.Show(UIMsg, "敬请期待~")
 
@@ -411,9 +424,9 @@ export default class UIMain extends UIBase {
         //  console.log('zh:停止播放bjyy_m');
         //xGame.soundMgr.stopSound("bjyy_m");
 
-        
-       // console.log('zh: hide 停止播放主頁面背景音乐');
-      //  xGame.soundMgr.stopMusic();
+
+        // console.log('zh: hide 停止播放主頁面背景音乐');
+        //  xGame.soundMgr.stopMusic();
 
 
 

+ 1 - 0
client/laya/src/ui/UIModeSelection.ts

@@ -41,6 +41,7 @@ export default class UIModeSelection extends UIBase {
         }
     }
     public enterGame(type) {
+        console.log('zh: 进入经典模式 type: ' + type);
         xGame.common.classicRoomType = type;
         let cfg = cfgTable.modeselectData[type];
         let need = cfg.need;

+ 1 - 0
client/laya/src/ui/UISign.ts

@@ -141,6 +141,7 @@ export default class UISign extends UIBase {
        // JSBridgeUtils.instance.showRewardAd('xxxxx');
         console.log('zh:qjff_AD_for_uisign')
         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uisign')) {
+           
         
         } else {
             console.log('zh:AD 失败,直接发放奖励')

+ 4 - 1
client/laya/src/ui/UIVideoShare.ts

@@ -5,6 +5,8 @@ import PlatMgr from "../game/PlatMgr";
 import { xGame } from "../xGame";
 import UIGameEnd from "./UIGameEnd";
 import UIMsg from "./UIMsg";
+import JSBridgeUtils from "../utils/JSBridgeUtils"; // 根据你的目录结构调整路径
+
 export default class UIVideoShare extends UIBase {
     protected ui: ui_UIVideoShare;
     public success: boolean = false;
@@ -32,7 +34,8 @@ export default class UIVideoShare extends UIBase {
         this.success = success;
         //
         let time = xGame.common.randomNum(600, 1500);
-        Moyu.showInsertAd(time, 60000);
+       // Moyu.showInsertAd(time, 60000);
+        JSBridgeUtils.instance.showInternAd('uivideoshare_show');
         //
         if (success) xGame.soundMgr.playSound("applause");
         this.ui.t0.play();

+ 11 - 10
client/laya/src/utils/JSBridgeUtils.ts

@@ -76,29 +76,30 @@ export default class JSBridgeUtils {
     }
     //************* */
     public showInternAd(mark): boolean {
+        console.log('zh:showInternAd start');
         if (!Laya.Browser.onAndroid) {
-            console.log('zh:非android dev')
+            console.log('zh:showInternAd 非android dev')
             return false;
         }
         if (!this.initBridge()) {
-           return false;
+            return false;
         }
         let rs = this.bridge.call("showInternAd", mark);
-        console.log('zh:showInternAd rs= ' + rs + '   ,mark=' + mark);
+        // console.log('zh:showInternAd rs= ' + rs + '   ,mark=' + mark);
         try {
             const result = JSON.parse(rs);
             if (result.code === 200) {
-                console.log("zh:广告显示成功");
+                console.log("zh:showInternAd OK");
                 // 执行广告展示后的逻辑,例如记录日志、更新UI等
                 return true;
             } else {
-                console.warn("zh:广告显示失败:", result.msg);
+                console.warn("zh:showInternAd  FAILL:", result.msg);
                 // 可以弹出提示、上报错误、尝试重试等
-                  return false;
+                return false;
             }
         } catch (e) {
             console.error("zh:解析桥接返回值失败:", e);
-              return false;
+            return false;
         }
 
     }
@@ -133,8 +134,8 @@ export default class JSBridgeUtils {
 
 
 
-    
-     nativeCallJs(msg: string) {
+
+    nativeCallJs(msg: string) {
         console.log("zh:nativeCallJs received data: 1111", msg);
         if (msg === 'Ad1') {
             GlobalManager.instance.callMethod('Ad1')
@@ -151,7 +152,7 @@ export default class JSBridgeUtils {
         } else if (msg === 'Ad5') {
             console.log("zh: Ad5 奖励发送成功");
             GlobalManager.instance.callMethod('Ad5')
-            
+
         }
     }
 

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików