private static void OnInternalInterstitialAdCompleted(IAdClient client, AdPlacement placement)
 {
     if (InterstitialAdCompleted != null)
     {
         InterstitialAdCompleted((InterstitialAdNetwork)client.Network, placement);
     }
 }
 private static void OnInternalRewardedAdCompleted(IAdClient client, AdPlacement placement)
 {
     if (RewardedAdCompleted != null)
     {
         RewardedAdCompleted((RewardedAdNetwork)client.Network, placement);
     }
 }
Example #3
0
        private static bool IsInterstitialAdReady(IAdClient client, AdLocation location)
        {
            if (IsAdRemoved())
            {
                return(false);
            }

            return(client.IsInterstitialAdReady(location));
        }
Example #4
0
        private static void LoadInterstitialAd(IAdClient client, AdLocation location)
        {
            if (IsAdRemoved())
            {
                return;
            }

            client.LoadInterstitialAd(location);
        }
        private static bool IsInterstitialAdReady(IAdClient client, AdPlacement placement)
        {
            if (IsAdRemoved())
            {
                return(false);
            }

            return(client.IsInterstitialAdReady(placement));
        }
        private static void LoadInterstitialAd(IAdClient client, AdPlacement placement)
        {
            if (IsAdRemoved())
            {
                return;
            }

            client.LoadInterstitialAd(placement);
        }
Example #7
0
        private static void ShowBannerAd(IAdClient client, BannerAdPosition position, BannerAdSize size)
        {
            if (IsAdRemoved())
            {
                Debug.Log("Could not show banner ad: ads were disabled by RemoveAds().");
                return;
            }

            client.ShowBannerAd(position, size);
        }
        private static void ShowInterstitialAd(IAdClient client, AdPlacement placement)
        {
            if (IsAdRemoved())
            {
                Debug.Log("Could not show interstitial ad: ads were disabled by RemoveAds().");
                return;
            }

            client.ShowInterstitialAd(placement);
        }
        private static void SubscribeAdClientEvents(IAdClient client)
        {
            if (client == null)
            {
                return;
            }

            client.InterstitialAdCompleted += OnInternalInterstitialAdCompleted;
            client.RewardedAdSkipped       += OnInternalRewardedAdSkipped;
            client.RewardedAdCompleted     += OnInternalRewardedAdCompleted;
        }
Example #10
0
        private static void ShowBannerAd(IAdClient client, AdPlacement placement, BannerAdPosition position, BannerAdSize size)
        {
            if (IsAdRemoved())
            {
                Debug.Log("Could not show banner ad: ads were removed.");
                return;
            }

            client.ShowBannerAd(placement, position, size);
            AddActiveBannerAd(client.Network, placement);
        }
Example #11
0
        static void Main(string[] args)
        {
            Console.Write("Enter login:"******"Enter password:"******"Ok");

            Packer.Initialize();
            _client = new AdClient();
            if (_client == null)
            {
                return;
            }

            Console.WriteLine("Waiting..");
            Thread.Sleep(3000);

            _allObjects  = _client.Dictionaries.GetObjects();
            _bot         = new TelegramBotClient(Properties.RemoteBot.Default.Token);
            _bgw         = new BackgroundWorker();
            _bgw.DoWork += CheckBot;
            _bgw.RunWorkerAsync();
            Console.WriteLine("RemoteBot {0} started.", Properties.RemoteBot.Default.Name);
            _client.OnConnectionChanged += OnConnectionChanged;

            Console.ReadKey();
        }
Example #12
0
 private static void DestroyBannerAd(IAdClient client)
 {
     client.DestroyBannerAd();
 }
Example #13
0
 private static void LoadRewardedAd(IAdClient client, AdLocation location)
 {
     client.LoadRewardedAd(location);
 }
Example #14
0
 private static void ShowRewardedAd(IAdClient client, AdPlacement placement)
 {
     client.ShowRewardedAd(placement);
 }
Example #15
0
 private static bool IsRewardedAdReady(IAdClient client, AdPlacement placement)
 {
     return(client.IsRewardedAdReady(placement));
 }
Example #16
0
        // Note that rewarded ads should still be available after ads removal.
        // which is why we don't check if ads were removed in the following methods.

        private static void LoadRewardedAd(IAdClient client, AdPlacement placement)
        {
            client.LoadRewardedAd(placement);
        }
Example #17
0
 private static bool IsRewardedAdReady(IAdClient client, AdLocation location)
 {
     return(client.IsRewardedAdReady(location));
 }
Example #18
0
 private static void HideBannerAd(IAdClient client)
 {
     client.HideBannerAd();
 }
Example #19
0
 private static void DestroyBannerAd(IAdClient client, AdPlacement placement)
 {
     client.DestroyBannerAd(placement);
     RemoveActiveBannerAd(client.Network, placement);
 }
Example #20
0
 private static void ShowRewardedAd(IAdClient client, AdLocation location)
 {
     // Note that we don't check if ads were removed because
     // rewarded ads should still be available after ads removal.
     client.ShowRewardedAd(location);
 }