Beispiel #1
0
        private void handleAdLoad(bool isRewardedAd, JsonData jsonData)
        {
            AdLoadListener adLoadListener = isRewardedAd ? rewardedAdLoadListener : interstitialAdLoadListener;

            if (adLoadListener == null)
            {
                return;
            }
            int loadStatus = (int)jsonData["loadStatus"];

            if (loadStatus == AD_LOADED)
            {
                adLoadListener.onAdLoaded((string)jsonData["unitId"], (string)jsonData["adWrapperId"]);
            }
            else
            {
                adLoadListener.onAdError((string)jsonData["unitId"], (int)jsonData["errCode"], (string)jsonData["errMessage"]);
            }
        }
Beispiel #2
0
 public void loadRewardedAdForShow(string unitId, AdLoadListener adLoadListener)
 {
     rewardedAdLoadListener = adLoadListener;
     instance.loadRewardedAdForShow(unitId);
 }
Beispiel #3
0
 public void loadInterstitialAdForShow(string unitId, AdLoadListener adLoadListener)
 {
     interstitialAdLoadListener = adLoadListener;
     instance.loadInterstitialAdForShow(unitId);
 }