Ejemplo n.º 1
0
    public static void ShowADS()
    {
        if (timeShowAds > 120 || !firstShowAds)
        {
            firstShowAds = true;
            timeShowAds  = 0;
#if UNITY_ANDROID
            using (AndroidJavaClass jc = new AndroidJavaClass("com.bubbleshoot2.free.UnityPlayerNativeActivity"))
            {
                jc.CallStatic <int>("ShowAds");
            }
#elif UNITY_WP8
            WP8Statics.ShowAds("");
#elif UNITY_IOS
            IOsStatic.ShowAds(" ", " ");
#endif
        }
        else
        {
#if UNITY_ANDROID
            using (AndroidJavaClass jc = new AndroidJavaClass("com.bubbleshoot2.free.UnityPlayerNativeActivity"))
            {
                jc.CallStatic <int>("ShowAdsBackup");
            }
#elif UNITY_WP8
            // WP8Statics.ShowAds("");
#elif UNITY_IOS
            //IOsStatic.ShowAds(" ", " ");
#endif
        }
    }
Ejemplo n.º 2
0
    public static void ShowADS()
    {
        if (timeShowAds > 60 || !firstShowAds || !firstShowAdsAtBegin)
        {
            if (!firstShowAdsAtBegin)
            {
                firstShowAdsAtBegin = true;
            }
            else if (!firstShowAds)
            {
                firstShowAds = true;
            }
            timeShowAds = 0;
#if UNITY_ANDROID
            using (AndroidJavaClass jc = new AndroidJavaClass("com.xiaxio.bubbleshoot.UnityPlayerActivity"))
            {
                jc.CallStatic <int>("ShowAds");
            }
#elif UNITY_WP8
            WP8Statics.ShowAds("");
#elif UNITY_IOS
            IOsStatic.ShowAds(" ", " ");
#endif
        }
    }