public bool TryShowAd(AdPlacement adPlacement) { if (IsAdEnabled(adPlacement)) { return(fullscreenAdsModel.TryShowAd(adPlacement)); } OnAdComplete.Dispatch(new AdResultData(adPlacement, AdResult.Finished, GetProviderId())); return(true); }
/// <summary> /// Enqueues the Volplane advertisement finished event. /// </summary> /// <param name="adWasShown">If set to <c>true</c> ad was shown.</param> private void AdFinished(bool adWasShown) { // OnAdComplete (without indicator) if (OnAdComplete != null) { eventQueue.Enqueue(delegate { OnAdComplete.Invoke(); }); } // OnAdComplete (with indicator) if (OnAdCompleteSecondary != null) { eventQueue.Enqueue(delegate { OnAdCompleteSecondary.Invoke(adWasShown); }); } }
void AdCompleted(AdResultData adResultData) { Debug.LogFormat("[Ads] Ad complete: {0} from: {1}.", adResultData.placement, adResultData.provider); OnAdComplete.Dispatch(adResultData); }