Esempio n. 1
0
 public void ShowInterstitial()
 {
     if (Yodo1U3dMas.IsInterstitialAdLoaded())
     {
         Yodo1U3dMas.ShowInterstitialAd();
     }
 }
Esempio n. 2
0
    void OnGUI()
    {
        int buttonHeight = Screen.height / 13;
        int buttonWidth  = Screen.width / 2;
        int buttonSpace  = buttonHeight / 2;
        int startHeight  = buttonHeight / 2;

        if (GUI.Button(new Rect(Screen.width / 4, startHeight, buttonWidth, buttonHeight), "Show Banner Ad"))
        {
            if (Yodo1U3dMas.IsBannerAdLoaded())
            {
                int align = Yodo1U3dBannerAlign.BannerTop | Yodo1U3dBannerAlign.BannerHorizontalCenter;
                Yodo1U3dMas.ShowBannerAd(align);
            }
            else
            {
                Debug.Log("[Yodo1 Mas] Banner ad has not been cached.");
            }
        }

        if (GUI.Button(new Rect(Screen.width / 4, startHeight + buttonHeight + buttonSpace, buttonWidth, buttonHeight), "Dismiss Banner Ad"))
        {
            Yodo1U3dMas.DismissBannerAd();
        }

        if (GUI.Button(new Rect(Screen.width / 4, startHeight + buttonHeight * 2 + buttonSpace * 2, buttonWidth, buttonHeight), "Show Interstitial Ad"))
        {
            if (Yodo1U3dMas.IsInterstitialAdLoaded())
            {
                Yodo1U3dMas.ShowInterstitialAd();
            }
            else
            {
                Debug.Log("[Yodo1 Mas] Interstitial ad has not been cached.");
            }
        }

        if (GUI.Button(new Rect(Screen.width / 4, startHeight + buttonHeight * 3 + buttonSpace * 3, buttonWidth, buttonHeight), "Show Rewarded Ad"))
        {
            if (Yodo1U3dMas.IsRewardedAdLoaded())
            {
                Yodo1U3dMas.ShowRewardedAd();
            }
            else
            {
                Debug.Log("[Yodo1 Mas] Reward video ad has not been cached.");
            }
        }
    }