Пример #1
0
    private void RequestBanner()
    {
        if (MainMenuAd.isRemovedAds())
        {
            return;
        }
        bannerView = new BannerView(AdUnitIds.getAdUnitId(Ads.Game_Banner), AdSize.Banner, AdPosition.BottomLeft);

        AdRequest request = new AdRequest.Builder().Build();

        bannerView.LoadAd(request);
    }
Пример #2
0
    public void showRewardAd(OnlineMenu online)
    {
        onlineMenu = online;

        rewardedAd = new RewardedAd(AdUnitIds.getAdUnitId(Ads.Search_Reward));

        AdRequest request = new AdRequest.Builder().Build();

        rewardedAd.OnAdLoaded         += HandleRewardedAdLoaded;
        rewardedAd.OnUserEarnedReward += HandleUserEarnedReward;

        rewardedAd.LoadAd(request);
    }
Пример #3
0
    private void RequestInterstitial()
    {
        if (isRemovedAds())
        {
            return;
        }
        // Initialize an InterstitialAd.
        interstitial = new InterstitialAd(AdUnitIds.getAdUnitId(Ads.Menu_Popup));

        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().Build();

        // Load the interstitial with the request.
        interstitial.LoadAd(request);
    }
Пример #4
0
    private void RequestBanner()
    {
        if (isRemovedAds())
        {
            return;
        }
        // Create a 320x50 banner at the top of the screen.
        bannerView = new BannerView(AdUnitIds.getAdUnitId(Ads.Menu_Banner), AdSize.Banner, AdPosition.Bottom);

        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().Build();

        // Load the banner with the request.
        bannerView.LoadAd(request);
    }
Пример #5
0
    private void RequestInterstitial()
    {
        if (MainMenuAd.isRemovedAds())
        {
            return;
        }
        MobileAds.Initialize(initStatus => { });

        interstitial = new InterstitialAd(AdUnitIds.getAdUnitId(Ads.Menu_Popup));

        AdRequest request = new AdRequest.Builder().Build();

        interstitial.OnAdClosed += HandleOnAdClosed;
        interstitial.OnAdLoaded += HandleOnAdLoaded;
        interstitial.LoadAd(request);
    }