void OnApplicationFocus(bool hasFocus) { if (hasFocus) { // Notify application focus on ads AdsController.OnResume(); } }
void OnApplicationFocus(bool hasFocus) { if (hasFocus) { // Ignore if we've just showen an ad if (hasJustShowenbAd) { hasJustShowenbAd = false; } else { // Notify application focus on ads AdsController.OnResume(); // Show interstitial AdsController.ShowInterstitialAd(); // Set showen ad flag hasJustShowenbAd = true; } } }