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);
}
}
↧