void Call() { switch (type) { case AdsType.Banner: AdsManager.ShowBanner(index); break; case AdsType.Interstitial: AdsManager.ShowInterstitial(index); break; case AdsType.Icon: AdsManager.ShowIConAd(index, gameObject); break; case AdsType.Native: AdsManager.ShowNative(index, gameObject); break; } }
void OnEnable() { switch (type) { case AdsType.Banner: AdsManager.ShowBanner(index); break; case AdsType.Interstitial: AdsManager.ShowInterstitial(index); break; case AdsType.Icon: AdsManager.ShowIConAd(index, gameObject); break; case AdsType.Native: AdsManager.ShowNative(index, gameObject); break; default: throw new ArgumentOutOfRangeException(); } }