public void loadInterstitialForZoneId(string zoneIdiOS, string zoneIdAndroid, bool refresh) { if (refresh) { if (state != InterstitialState.New && state != InterstitialState.Loaded) { return; } } else if (state != InterstitialState.New) { return; } androidZoneId = zoneIdAndroid; iosZoneId = zoneIdiOS; isRefresh = refresh; state = InterstitialState.Loading; InterstitialDelegate interstitialDelegate = new InterstitialDelegate(this); if (Application.platform == RuntimePlatform.IPhonePlayer) { if (zoneIdiOS != null) { interstitial = new AMR.iOS.AMRInterstitial(); interstitial.loadInterstitialForZoneId(zoneIdiOS, interstitialDelegate); } } else if (Application.platform == RuntimePlatform.Android) { if (zoneIdAndroid != null) { if (interstitial != null) { interstitial.destroyInterstitial(); } interstitial = new AMR.Android.AMRInterstitial(); interstitial.loadInterstitialForZoneId(zoneIdAndroid, interstitialDelegate); } } }
public void showInterstitial(String tag) { state = InterstitialState.Showing; interstitial.showInterstitial(tag); }
public void showInterstitial() { state = InterstitialState.Showing; interstitial.showInterstitial(); }