每三局播放插页式广告 [英] Play interstitial ad every 3rd game
本文介绍了每三局播放插页式广告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用HeyZap中介SDK.我已将所有中介设置得都很好,但是我希望插页式广告能够展示每场第3场比赛.
I'm using the HeyZap mediation SDK. I have all the mediation set up perfectly fine, but I would like for the interstitial ad to show every 3rd game.
我在此处尝试了一些有关Stack Overflow的解决方案,但它们适用于AdMob.
I've tried some solutions here on Stack Overflow but they apply to AdMob.
现在,我有:
-(void) GameOver {
....
[HZInterstitialAd show];
}
我该如何实现?
推荐答案
保留所玩游戏数的计数器,然后仅在以下情况下显示
keep a counter of the number of games played and then only show it if
static int count = 0;
-(void) GameOver {
if(count != 0 && count % 3 == 0)
[HZInterstitialAd show];
count++;
}
这篇关于每三局播放插页式广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文