Ejemplo n.º 1
0
    public static void ShowAd(string mode)
    {
        if (mode == "interstitial")
        {
            if (interstitialAd.IsLoaded())
            {
                Debug.Log("View insterstitial Ad");
            }
            else
            {
                Debug.Log("Interstitial Ad is not loaded");
                LoadAd(mode);
            }
            interstitialAd.Show();
        }
        else if (mode == "reward")
        {
            instance.StopAllCoroutines();
            instance.StartCoroutine("CheckLoaded");

            /*if (rewardAd.IsLoaded ()) {
             *      rewardAd.Show ();
             *      Debug.Log ("View Reward Ad");
             * } else {
             *      Debug.Log ("Reward Ad is not loaded");
             *      //LoadAd (mode);
             *      instance.StartCoroutine("CheckLoaded");
             * }*/
        }
    }