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); } }
private static bool IsInterstitialAdReady(IAdClient client, AdLocation location) { if (IsAdRemoved()) { return(false); } return(client.IsInterstitialAdReady(location)); }
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); }
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; }
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); }
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(); }
private static void DestroyBannerAd(IAdClient client) { client.DestroyBannerAd(); }
private static void LoadRewardedAd(IAdClient client, AdLocation location) { client.LoadRewardedAd(location); }
private static void ShowRewardedAd(IAdClient client, AdPlacement placement) { client.ShowRewardedAd(placement); }
private static bool IsRewardedAdReady(IAdClient client, AdPlacement placement) { return(client.IsRewardedAdReady(placement)); }
// 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); }
private static bool IsRewardedAdReady(IAdClient client, AdLocation location) { return(client.IsRewardedAdReady(location)); }
private static void HideBannerAd(IAdClient client) { client.HideBannerAd(); }
private static void DestroyBannerAd(IAdClient client, AdPlacement placement) { client.DestroyBannerAd(placement); RemoveActiveBannerAd(client.Network, placement); }
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); }