|
@@ -212,11 +212,11 @@ cc.Class({
|
|
// 初始化SDK
|
|
// 初始化SDK
|
|
|
|
|
|
//ATSDK.initSDK("h66f7c5f8028cf", "ab133deec743a4bb58930891fd75d3f83");//测试专用,可以显示广告 ???
|
|
//ATSDK.initSDK("h66f7c5f8028cf", "ab133deec743a4bb58930891fd75d3f83");//测试专用,可以显示广告 ???
|
|
- ATSDK.initSDK("h67122e47607cd", "a4fd9a23bdd71c2314cf41140a77abb1e");//这是cccc线上的
|
|
|
|
|
|
+ //ATSDK.initSDK("h67122e47607cd", "a4fd9a23bdd71c2314cf41140a77abb1e");//这是cccc线上的
|
|
|
|
|
|
- //ATSDK.initSDK("h672d7ac280581", "a899a1cd61dd62b83793d38c70486c750");//hxz
|
|
|
|
|
|
+ ATSDK.initSDK("h672d7ac280581", "a899a1cd61dd62b83793d38c70486c750");//hxz
|
|
|
|
|
|
- ATSDK.setLogDebug(true);
|
|
|
|
|
|
+ ATSDK.setLogDebug(false);//ZH:DIY
|
|
var GDPRLevel = ATSDK.getGDPRLevel();
|
|
var GDPRLevel = ATSDK.getGDPRLevel();
|
|
//var state = false;
|
|
//var state = false;
|
|
// const listener = {
|
|
// const listener = {
|
|
@@ -424,11 +424,19 @@ cc.Class({
|
|
|
|
|
|
//下面是上线后的逻辑
|
|
//下面是上线后的逻辑
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
|
+
|
|
if (cc.sys.os === cc.sys.OS_ANDROID) {
|
|
if (cc.sys.os === cc.sys.OS_ANDROID) {
|
|
let placementID = AAJS2.getPlacementID();
|
|
let placementID = AAJS2.getPlacementID();
|
|
if (ATRewardedVideoSDK.hasAdReady(placementID)) {
|
|
if (ATRewardedVideoSDK.hasAdReady(placementID)) {
|
|
cc.sys.localStorage.setItem(yxAdMark, 'fuHuo');//看广告用于 复活 标记
|
|
cc.sys.localStorage.setItem(yxAdMark, 'fuHuo');//看广告用于 复活 标记
|
|
ATRewardedVideoSDK.showAd(placementID);
|
|
ATRewardedVideoSDK.showAd(placementID);
|
|
|
|
+
|
|
|
|
+ console.log('zh:clear timer s')
|
|
|
|
+ if (this.reviveTimer) {
|
|
|
|
+ clearInterval(this.reviveTimer)
|
|
|
|
+ }
|
|
|
|
+ console.log('zh:clear timer e')
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
this.clearAdMark();
|
|
this.clearAdMark();
|
|
console.log('zh:AD 没有准备好')
|
|
console.log('zh:AD 没有准备好')
|
|
@@ -455,7 +463,8 @@ cc.Class({
|
|
this.revivePage.getChildByName('askRevive').active = false
|
|
this.revivePage.getChildByName('askRevive').active = false
|
|
this.revivePage.getChildByName('successRevive').active = true
|
|
this.revivePage.getChildByName('successRevive').active = true
|
|
},
|
|
},
|
|
- onReviveCertainBtn() {
|
|
|
|
|
|
+ onReviveCertainBtn() {//应该是看了广告点击获取步数后执行
|
|
|
|
+ console.log('zh:onReviveCertainBtn 看了广告点击获取步数后执行')
|
|
this._controller.pageManager.removePage(2)
|
|
this._controller.pageManager.removePage(2)
|
|
this.revivePage.active = false
|
|
this.revivePage.active = false
|
|
this._status = 1
|
|
this._status = 1
|
|
@@ -471,10 +480,11 @@ cc.Class({
|
|
onSkipReviveForDiy() {
|
|
onSkipReviveForDiy() {
|
|
console.log('zh:onSkipReviveForDiy zh ')
|
|
console.log('zh:onSkipReviveForDiy zh ')
|
|
clearInterval(this.reviveTimer)
|
|
clearInterval(this.reviveTimer)
|
|
|
|
+ this.onReviveButton();
|
|
// 5 复活页面
|
|
// 5 复活页面
|
|
//this._controller.pageManager.pages[5].active = false
|
|
//this._controller.pageManager.pages[5].active = false
|
|
//this._score.onGameOver(true)
|
|
//this._score.onGameOver(true)
|
|
- this.isRangeAction = false
|
|
|
|
|
|
+ //this.isRangeAction = false
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|