예제 #1
0
파일: core.cs 프로젝트: willardf/Be-Me
 /// <summary>
 /// Used to open URLs.
 /// </summary>
 /// <param name="url">The URL to open.</param>
 /// <param name="open_in_new_tab">Setto true if you want to URL opened in a new tab. WebGL games will prompt the user before doing so (to get around popup blockers).</param>
 public static void openUrl(string url, bool open_in_new_tab = false)
 {
     // if a new tab is requested and we're in WebGL mode, we need to use our plugin magic
     if (open_in_new_tab && SessionLoader.ngioPluginLoaded())
     {
         Application.ExternalCall("newgroundsio_plugin_openURL", url, "_blank");
     }
     else
     {
         Application.OpenURL(url);
     }
 }
예제 #2
0
 /// <summary>
 /// Used to open URLs.
 /// </summary>
 /// <param name="url">The URL to open.</param>
 /// <param name="open_in_new_tab">Setto true if you want to URL opened in a new tab. WebGL games will prompt the user before doing so (to get around popup blockers).</param>
 public static void openUrl(string url, bool open_in_new_tab = false)
 {
     // if a new tab is requested and we're in WebGL mode, we need to use our plugin magic
     if (open_in_new_tab && SessionLoader.ngioPluginLoaded())
     {
         newgroundsioOpenUrlInNewTab(url);
     }
     else
     {
         Application.OpenURL(url);
     }
 }