Exemplo n.º 1
0
 public void OnClickedChangeNetwork()
 {
     SelectedAdNetwork++;
     if (SelectedAdNetwork > 5)
     {
         SelectedAdNetwork = 0;
     }
     if (SelectedAdNetwork == 1)
     {
         adPartner = AdsMaster.FindActiveAdProvider(ProviderID.Admob);
     }
     else if (SelectedAdNetwork == 2)
     {
         adPartner = AdsMaster.FindActiveAdProvider(ProviderID.ChartBoost);
     }
     else if (SelectedAdNetwork == 3)
     {
         adPartner = AdsMaster.FindActiveAdProvider(ProviderID.UnityAd);
     }
     else if (SelectedAdNetwork == 4)
     {
         adPartner = AdsMaster.FindActiveAdProvider(ProviderID.Vungle);
     }
     else if (SelectedAdNetwork == 5)
     {
         adPartner = AdsMaster.FindActiveAdProvider(ProviderID.FbAd);
     }
     else
     {
         adPartner = null;
     }
 }
Exemplo n.º 2
0
        public static AdProvider FindActiveAdProvider(ProviderID idProvider)
        {
            if (instance == null)
            {
                return(null);
            }
            AdProvider res = null;

            foreach (var provider in Providers)
            {
                if (provider.ID == idProvider)
                {
                    res = provider;
                    break;
                }
            }
            return(res);
        }
Exemplo n.º 3
0
 //call whenever provider display ad
 public static void OnDisplayAd(AdProvider provider, AdType type)
 {
 }