Reputation: 1159
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.
I've tried some solutions here on Stack Overflow but they apply to AdMob.
Right now, I have:
-(void) GameOver {
....
[HZInterstitialAd show];
}
How do I achieve this?
Upvotes: 0
Views: 269
Reputation: 11597
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++;
}
Upvotes: 2