private static void ExpressAd_OnAdDislikeMethod(int index, int dislikeID, string dislikeReason, int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         IDislikeInteractionListener listener;
         if (dislikeListeners.TryGetValue(context, out listener))
         {
             ExpressAd expressAd = expressAds[index];
             listener.OnSelected(dislikeID, dislikeReason);
         }
         else
         {
             Debug.LogError(
                 "The ExpressAd_OnAdDislike can not find the context.");
         }
     });
 }
 private static void ExpressAd_OnAdViewRenderErrorMethod(int index, int code, string message, int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         IExpressAdInteractionListener listener;
         if (interactionListeners.TryGetValue(context, out listener))
         {
             ExpressAd expressAd = expressAds[index];
             listener.OnAdViewRenderError(expressAd, code, message);
         }
         else
         {
             Debug.LogError(
                 "The ExpressAd_OnAdViewRenderError can not find the context.");
         }
     });
 }
 private static void ExpressAd_DidClickMethod(int index, int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         IExpressAdInteractionListener listener;
         if (interactionListeners.TryGetValue(context, out listener))
         {
             ExpressAd expressAd = expressAds[index];
             listener.OnAdClicked(expressAd);
         }
         else
         {
             Debug.LogError(
                 "The ExpressAd_DidClick can not find the context.");
         }
     });
 }
 private static void ExpressSplashAd_OnAdCloseMethod(int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         ISplashAdInteractionListener listener;
         if (interactionListeners.TryGetValue(context, out listener))
         {
             interactionListeners.Remove(context);
             listener.OnAdSkip();
         }
         else
         {
             Debug.LogError(
                 "The ExpressSplashAd_OnAdClose can not find the context.");
         }
     });
 }
 private static void ExpressAd_OnAdViewRenderSuccMethod(int index, float width, float height, int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         IExpressAdInteractionListener listener;
         if (interactionListeners.TryGetValue(context, out listener))
         {
             ExpressAd expressAd = expressAds[index];
             listener.OnAdViewRenderSucc(expressAd, width, height);
         }
         else
         {
             Debug.LogError(
                 "The ExpressAd_OnAdViewRenderSucc can not find the context.");
         }
     });
 }
 private static void FullScreenVideoAd_OnFullScreenVideoCachedMethod(int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         IFullScreenVideoAdListener listener;
         if (loadListeners.TryGetValue(context, out listener))
         {
             loadListeners.Remove(context);
             listener.OnFullScreenVideoCached();
         }
         else
         {
             Debug.LogError(
                 "The OnFullScreenVideoCached can not find the context.");
         }
     });
 }
Exemple #7
0
 private static void RewardVideoAd_OnRewardVerifyMethod(
     bool rewardVerify, int rewardAmount, string rewardName, int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         IRewardAdInteractionListener listener;
         if (interactionListeners.TryGetValue(context, out listener))
         {
             listener.OnRewardVerify(rewardVerify, rewardAmount, rewardName);
         }
         else
         {
             Debug.LogError(
                 "The OnRewardVerify can not find the context.");
         }
     });
 }
Exemple #8
0
 private static void RewardVideoAd_OnRewardVideoAdLoadMethod(IntPtr rewardVideoAd, int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         IRewardVideoAdListener listener;
         if (loadListeners.TryGetValue(context, out listener))
         {
             loadListeners.Remove(context);
             listener.OnRewardVideoAdLoad(new RewardVideoAd(rewardVideoAd));
         }
         else
         {
             Debug.LogError(
                 "The OnRewardVideoAdLoad can not find the context.");
         }
     });
 }
Exemple #9
0
 private static void SplashAd_OnErrorMethod(int code, string message, int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         ISplashAdListener listener;
         if (loadListeners.TryGetValue(context, out listener))
         {
             loadListeners.Remove(context);
             listener.OnError(code, message);
         }
         else
         {
             Debug.LogError(
                 "The SplashAd_OnError can not find the context.");
         }
     });
 }
 private static void ExpressSplashAd_OnLoadMethod(IntPtr splashAd, int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         ISplashAdListener listener;
         if (loadListeners.TryGetValue(context, out listener))
         {
             loadListeners.Remove(context);
             listener.OnSplashAdLoad(new BUExpressSplashAd(splashAd));
         }
         else
         {
             Debug.LogError(
                 "The SplashAd_OnLoad can not find the context.");
         }
     });
 }
 private static void ExpressAd_OnLoadMethod(IntPtr expressAd, int context)
 {
     UnityDispatcher.PostTask(() =>
     {
         ;
         IExpressAdListener listener;
         if (loadListeners.TryGetValue(context, out listener))
         {
             loadListeners.Remove(context);
             listener.OnExpressInterstitialAdLoad(new ExpressInterstitialAd(expressAd));
         }
         else
         {
             Debug.LogError(
                 "The ExpressAd_OnLoad can not find the context.");
         }
     });
 }
        private static void NativeAd_OnNativeAdLoadMethod(IntPtr nativeAd, int context, int slotType)
        {
            UnityDispatcher.PostTask(() =>
            {
                INativeAdListener listener;
                if (loadListeners.TryGetValue(context, out listener))
                {
                    loadListeners.Remove(context);

                    /**
                     * BUAdSlotAdTypeBanner        = 1,       // banner ads
                     * BUAdSlotAdTypeInterstitial  = 2,       // interstitial ads
                     * BUAdSlotAdTypeFeed = 5,
                     */
                    AdSlotType adType = AdSlotType.Banner;
                    if (slotType == 1)
                    {
                        adType = AdSlotType.Banner;
                    }
                    else if (slotType == 2)
                    {
                        adType = AdSlotType.InteractionAd;
                    }
                    else if (slotType == 5)
                    {
                        adType = AdSlotType.Feed;
                    }

                    listener.OnNativeAdLoad(null, new NativeAd(nativeAd, adType));
                }
                else
                {
                    Debug.LogError(
                        "The NativeAd_OnNativeAdLoad can not find the context.");
                }
            });
        }
 public void onAdShow(AndroidJavaObject view, int var2)
 {
     UnityDispatcher.PostTask(
         () => this.listener.OnAdShow(var2));
 }
 public void onAdTimeOver()
 {
     UnityDispatcher.PostTask(() => this.listener.OnAdTimeOver());
 }
Exemple #15
0
 public void onRewardVerify(
     bool rewardVerify, int rewardAmount, string rewardName)
 {
     UnityDispatcher.PostTask(() => this.listener.OnRewardVerify(
                                  rewardVerify, rewardAmount, rewardName));
 }
Exemple #16
0
 public void onVideoError()
 {
     UnityDispatcher.PostTask(() => this.listener.OnVideoError());
 }
Exemple #17
0
 public void onVideoComplete()
 {
     UnityDispatcher.PostTask(() => this.listener.OnVideoComplete());
 }
Exemple #18
0
 void onAdDismiss()
 {
     UnityDispatcher.PostTask(
         () => this.listener.OnAdClose(null));
 }
Exemple #19
0
 private void OnDestroy()
 {
     postTasks.Clear();
     executing.Clear();
     instance = null;
 }
Exemple #20
0
 public void onFullScreenVideoCached()
 {
     UnityDispatcher.PostTask(
         () => this.listener.OnFullScreenVideoCached());
 }
Exemple #21
0
 public void onError(int code, string message)
 {
     UnityDispatcher.PostTask(
         () => this.listener.OnError(code, message));
 }
Exemple #22
0
 public void onRewardVideoCached()
 {
     UnityDispatcher.PostTask(
         () => this.listener.OnRewardVideoCached());
 }
 public void onCancel()
 {
     UnityDispatcher.PostTask(
         () => this.listener.OnCancel());
 }
 public void onSelected(int var1, string var2)
 {
     UnityDispatcher.PostTask(
         () => this.listener.OnSelected(var1, var2));
 }
 public void onAdSkip()
 {
     UnityDispatcher.PostTask(() => this.listener.OnAdSkip());
 }
Exemple #26
0
 void onError(int code, String message)
 {
     UnityDispatcher.PostTask(
         () => this.callback.OnError(code, message));
 }
Exemple #27
0
 public void onExitInstall()
 {
     UnityDispatcher.PostTask(this.callback);
 }
Exemple #28
0
 public void onAdVideoBarClick()
 {
     UnityDispatcher.PostTask(
         () => this.listener.OnAdVideoBarClick());
 }
Exemple #29
0
 public void onVideoError(int var1, int var2)
 {
     UnityDispatcher.PostTask(
         () => this.listener.OnVideoError(var1, var2));
 }
Exemple #30
0
 void onAdShow(AndroidJavaObject view, int type)
 {
     UnityDispatcher.PostTask(
         () => this.listener.OnAdShow(null));
 }