|
@@ -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();
|