Example #1
0
 public void CheckAndShowIntersitial(bool forceShow = false)
 {
     HDDebug.Log("ShowIntersitial: " + (_config.Ads.AdsType != null).ToString());
     if (_didInit && !InhouseSDK.getInstance().getIsPro())
     {
         int ratio = UnityEngine.Random.Range(0, 100);
         if (forceShow || ratio < _config.Ads.DisplayFrequencyOfInterstitial)
         {
             foreach (KeyValuePair <string, string> item in _config.Ads.AdsType)
             {
                 if (item.Key == TAG_ADSTYPE_INTERSITIAL)
                 {
                     BaseAds ads = _ads [item.Value];
                     if (ads != null)
                     {
                         ads.ShowIntersitial();
                     }
                     else
                     {
                         HDDebug.Log("AdsMgr: " + item.Key + " not supported");
                     }
                 }
             }
         }
     }
 }
Example #2
0
 public bool IsVideoAwardedAvaible()
 {
     HDDebug.Log("Check ShowVideoAwarded avaible");
     if (_didInit)
     {
         foreach (KeyValuePair <string, string> item in _config.Ads.AdsType)
         {
             if (item.Key == TAG_ADSTYPE_AWARDED)
             {
                 BaseAds ads = _ads [item.Value];
                 if (ads != null)
                 {
                     return(ads.IsVideoAwardAvaible());
                 }
                 return(false);
             }
         }
     }
     return(false);
 }
Example #3
0
 public void HideBanner()
 {
     if (_didInit && !InhouseSDK.getInstance().getIsPro())
     {
         foreach (KeyValuePair <string, string> item in _config.Ads.AdsType)
         {
             if (item.Key == TAG_ADSTYPE_BANER)
             {
                 BaseAds ads = _ads [item.Value];
                 if (ads != null)
                 {
                     ads.HideBanner();
                 }
                 else
                 {
                     HDDebug.Log("AdsMgr: " + item.Key + " not supported");
                 }
             }
         }
     }
 }
Example #4
0
 public void ShowVideoAwarded(Action <bool> callback)
 {
     HDDebug.Log("ShowVideoAwarded");
     if (_didInit)
     {
         foreach (KeyValuePair <string, string> item in _config.Ads.AdsType)
         {
             if (item.Key == TAG_ADSTYPE_AWARDED)
             {
                 BaseAds ads = _ads [item.Value];
                 if (ads != null)
                 {
                     ads.ShowVideoAward(callback);
                 }
                 else
                 {
                     HDDebug.Log("AdsMgr: " + item.Key + " not supported");
                 }
             }
         }
     }
 }
Example #5
0
 public bool IsBannerShowing()
 {
     if (_didInit && !InhouseSDK.getInstance().getIsPro())
     {
         foreach (KeyValuePair <string, string> item in _config.Ads.AdsType)
         {
             if (item.Key == TAG_ADSTYPE_BANER)
             {
                 BaseAds ads = _ads [item.Value];
                 if (ads != null)
                 {
                     return(ads.IsBannerShowing());
                 }
                 else
                 {
                     return(false);
                 }
             }
         }
     }
     return(false);
 }