Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

How to show an ad every 4 times my player dies

$
0
0
Hey, right now I have my ads setup so that every time my player dies it shows an ad. However, I want it so that an ad shows every 4 times the player dies. I've searched this up and can't find anything that exactly helps me. Here's what I've got so far: private void OnTriggerEnter2D(Collider2D collision { if (collision.tag == "Obstacle") { showAd(); } } private void showAd() { if (Chartboost.hasInterstitial(CBLocation.Default)) { Chartboost.showInterstitial(CBLocation.Default); } else { Chartboost.cacheInterstitial(CBLocation.Default); } }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>