コード例 #1
0
        public static void ShowAd(
            TapsellAd tapsellAd,
            string zoneId,
            TapsellShowOptions showOptions)
        {
            if (object.ReferenceEquals(showOptions, null))
            {
                showOptions = new TapsellShowOptions();
            }

#if UNITY_ANDROID && !UNITY_EDITOR
            expiringPool.Remove(tapsellAd.zoneId);
            tapsell.CallStatic("showAd",
                               tapsellAd.adId,
                               zoneId,
                               showOptions.backDisabled,
                               showOptions.immersiveMode,
                               showOptions.rotationMode,
                               showOptions.showDialog);
#elif UNITY_IOS && !UNITY_EDITOR
            string bDisabled = "false";
            if (showOptions.backDisabled)
            {
                bDisabled = "true";
            }

            string sDialog = "false";

            if (showOptions.showDialog)
            {
                sDialog = "true";
            }
            _TSShowAd(tapsellAd.adId, bDisabled, showOptions.rotationMode, sDialog);
#endif
        }
コード例 #2
0
ファイル: Tapsell.cs プロジェクト: alisaffari97/Fort-Unity
 /// <summary>
 /// Shows the ad with specified options.
 /// </summary>
 /// <param name="adId">Ad identifier.</param>
 /// <param name="showOptions">Show options.</param>
 public static void showAd(String adId, TapsellShowOptions showOptions)
 {
     if (object.ReferenceEquals(showOptions, null))
     {
         showOptions = new TapsellShowOptions();
     }
                 #if UNITY_ANDROID && !UNITY_EDITOR
     tapsell.CallStatic("showAd", adId, showOptions.backDisabled, showOptions.immersiveMode, showOptions.rotationMode, showOptions.showDialog);
                 #elif UNITY_IOS && !UNITY_EDITOR
     string bDisabled = "false";
     if (showOptions.backDisabled)
     {
         bDisabled = "true";
     }
     string sDialog = "false";
     if (showOptions.showDialog)
     {
         sDialog = "true";
     }
     _TSShowAd(adId, bDisabled, showOptions.rotationMode, sDialog);
                 #endif
 }