public void onLoaded() { if (CASFactory.isDebug) { Debug.Log("[CleverAdsSolutions] onLoaded " + adType.ToString()); } CASFactory.ExecuteEvent(OnAdLoaded); }
public void onComplete() { if (CASFactory.isDebug) { Debug.Log("[CleverAdsSolutions] onComplete " + adType.ToString()); } CASFactory.ExecuteEvent(OnAdCompleted); }
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; }); } }
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); } }); } }
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); } }); } }
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); } }