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"]); } }
public void loadRewardedAdForShow(string unitId, AdLoadListener adLoadListener) { rewardedAdLoadListener = adLoadListener; instance.loadRewardedAdForShow(unitId); }
public void loadInterstitialAdForShow(string unitId, AdLoadListener adLoadListener) { interstitialAdLoadListener = adLoadListener; instance.loadInterstitialAdForShow(unitId); }