public void ShowAdInsert(int rate) { if (!AppVersion.appCheckHasFinished) { return; } if (Common.noad) { return; } if (Common.isAndroid) { if (Common.GetDayIndexOfUse() <= Config.main.NO_AD_DAY) { return; } } int randvalue = Random.Range(0, 100); if (randvalue > rate) { return; } //show 之前重新设置广告 //InitAdInsert(); AdInsert.ShowAd(); }
public void AdInsertDidFail(string adsource) { int type = AdConfigParser.SOURCE_TYPE_INSERT; AdInfo info = AdConfig.main.GetNextPriority(type); if (info != null) { AdInsert.InitAd(info.source); AdInsert.ShowAd(); } else { if (callbackFinish != null) { callbackFinish(AdType.INSERT, AdStatus.FAIL, null); } } }