Exemplo n.º 1
0
 public void onLoaded()
 {
     if (CASFactory.isDebug)
     {
         Debug.Log("[CleverAdsSolutions] onLoaded " + adType.ToString());
     }
     CASFactory.ExecuteEvent(OnAdLoaded);
 }
Exemplo n.º 2
0
 public void onComplete()
 {
     if (CASFactory.isDebug)
     {
         Debug.Log("[CleverAdsSolutions] onComplete " + adType.ToString());
     }
     CASFactory.ExecuteEvent(OnAdCompleted);
 }
Exemplo n.º 3
0
 public void onInitialization(bool success, string error)
 {
     if (CASFactory.isDebug)
     {
         Debug.Log("[CleverAdsSolutions] onInitialization " + success);
     }
     manager.initializationListener = null;
     if (initCompleteAction != null)
     {
         CASFactory.ExecuteEvent(() =>
         {
             initCompleteAction(success, error);
             initCompleteAction = null;
         });
     }
 }
Exemplo n.º 4
0
 public void onShowFailed(string message)
 {
     if (CASFactory.isDebug)
     {
         Debug.Log("[CleverAdsSolutions] onShowFailed " + adType.ToString() + " with error: " + message);
     }
     if (OnAdFailedToShow != null)
     {
         CASFactory.ExecuteEvent(() =>
         {
             if (OnAdFailedToShow != null)
             {
                 OnAdFailedToShow(message);
             }
         });
     }
 }
Exemplo n.º 5
0
 public void onFailed(int error)
 {
     if (CASFactory.isDebug)
     {
         Debug.Log("[CleverAdsSolutions] onFailed " + adType.ToString() + " error: " + Enum.GetName(typeof(AdError), error));
     }
     if (OnAdFailed != null)
     {
         CASFactory.ExecuteEvent(() =>
         {
             if (OnAdFailed != null)
             {
                 OnAdFailed(( AdError )error);
             }
         });
     }
 }
Exemplo n.º 6
0
 public void onOpening(int net, double cpm, int accuracy)
 {
     if (CASFactory.isDebug)
     {
         Debug.Log("[CleverAdsSolutions] onOpening " + adType.ToString() + " net: " + net + " cpm: " + cpm + " accuracy: " + accuracy);
     }
     CASFactory.ExecuteEvent(OnAdShown);
     if (OnAdOpening != null)
     {
         CASFactory.ExecuteEvent(() =>
         {
             if (OnAdOpening != null)
             {
                 OnAdOpening(new AdMetaData(adType, ( AdNetwork )net, cpm, ( PriceAccuracy )accuracy));
             }
         });
     }
 }
 private static void RewardedLoadedAdCallback(IntPtr manager)
 {
     try
     {
         if (MobileAds.settings.isDebugMode)
         {
             Debug.Log("[CleverAdsSolutions] Rewarded Loaded");
         }
         var instance = IntPtrToManagerClient(manager);
         if (instance != null)
         {
             CASFactory.ExecuteEvent(instance.OnRewardedLoadedCallback);
         }
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
 }
        private static void InitializationCompleteCallback(IntPtr client, bool success, string error)
        {
            if (MobileAds.settings.isDebugMode)
            {
                Debug.Log("[CleverAdsSolutions] InitializationComplete " + success);
            }
            var instance = IntPtrToManagerClient(client);

            if (instance != null && instance._initCompleteAction != null)
            {
                CASFactory.ExecuteEvent(() =>
                {
                    if (instance._initCompleteAction != null)
                    {
                        instance._initCompleteAction(success, error);
                    }
                });
            }
        }
 private static void RewardedFailedAdCallback(IntPtr manager, int error)
 {
     try
     {
         var adError = ( AdError )error;
         if (MobileAds.settings.isDebugMode)
         {
             Debug.Log("[CleverAdsSolutions] Rewarded Failed with error: " + adError.ToString());
         }
         var instance = IntPtrToManagerClient(manager);
         if (instance != null)
         {
             CASFactory.ExecuteEvent(() => instance.OnFailedCallback(AdType.Rewarded, adError));
         }
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
 }