Ejemplo n.º 1
0
 private void Start()
 {
     this.siteHost = Network.SiteHost;
     Debug.Log((object)"[NewsWindow]Start");
     if (!MonoSingleton <DebugManager> .Instance.IsWebViewEnable())
     {
         if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CloseButton, (UnityEngine.Object)null))
         {
             ((Selectable)this.CloseButton).set_interactable(true);
         }
         Debug.Log((object)"[NewsWindow]Not WebView Enable");
     }
     else
     {
         Debug.Log((object)"[NewsWindow]WebView Enable");
         string str = Network.NewsHost + this.uriWhatsnew;
         if (NewsUtility.getNewsTypes() == NewsUtility.NewsTypes.Urgency)
         {
             str = Network.NewsHost + this.uriWhatsnewUrgency;
             NewsUtility.clearNewsType();
         }
         if (FlowNode_Variable.Get("WEBVIEW_ACCESS_TYPE") != null)
         {
             if (FlowNode_Variable.Get("WEBVIEW_ACCESS_TYPE") == "1")
             {
                 FlowNode_Variable.Set("WEBVIEW_ACCESS_TYPE", "0");
                 str = this.siteHost + this.serialcode_url + "?fuid=" + MonoSingleton <GameManager> .Instance.Player.FUID;
             }
             else
             {
                 if (FlowNode_Variable.Get("WEBVIEW_ACCESS_TYPE") == "2")
                 {
                     FlowNode_Variable.Set("WEBVIEW_ACCESS_TYPE", "0");
                     Application.OpenURL(this.offical_url);
                     return;
                 }
                 if (FlowNode_Variable.Get("WEBVIEW_ACCESS_TYPE") == "3")
                 {
                     FlowNode_Variable.Set("WEBVIEW_ACCESS_TYPE", "0");
                     str = this.siteHost + this.invitation_url + "?fuid=" + MonoSingleton <GameManager> .Instance.Player.FUID;
                 }
             }
         }
         this.mWebView = (UniWebView)((Component)this).GetComponent <UniWebView>();
         if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.WebViewContainer, (UnityEngine.Object)null) && UnityEngine.Object.op_Equality((UnityEngine.Object) this.mWebView, (UnityEngine.Object)null))
         {
             this.WebViewContainer.get_rect();
             this.mWebView = (UniWebView) new GameObject("UniWebView").AddComponent <UniWebView>();
             this.mWebView.OnLoadComplete            += new UniWebView.LoadCompleteDelegate(this.OnLoadComplete);
             this.mWebView.OnReceivedMessage         += new UniWebView.ReceivedMessageDelegate(this.OnReceivedMessage);
             this.mWebView.InsetsForScreenOreitation += new UniWebView.InsetsForScreenOreitationDelegate(this.InsetsForScreenOreitation);
             ((Component)this.mWebView).get_transform().SetParent((Transform)this.WebViewContainer, false);
             this.mWebView.insets = new UniWebViewEdgeInsets(0, 0, 0, 0);
             if (GameUtility.Config_Language == "french")
             {
                 str += "?lang=fr";
             }
             if (GameUtility.Config_Language == "german")
             {
                 str += "?lang=de";
             }
             if (GameUtility.Config_Language == "spanish")
             {
                 str += "?lang=es";
             }
             this.mWebView.url = str;
             this.mWebView.Load();
         }
         if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CloseButton, (UnityEngine.Object)null))
         {
             return;
         }
         ((Selectable)this.CloseButton).set_interactable(false);
     }
 }
Ejemplo n.º 2
0
 private void Success()
 {
     FlowNode_GsccInit.SettingAssets(Network.GetEnvironment.Assets, Network.GetEnvironment.AssetsEx);
     NewsUtility.setNewsState(Network.Pub, Network.PubU, MonoSingleton <GameManager> .Instance.Player.IsFirstLogin);
     MonoSingleton <GameManager> .Instance.InitAlterHash(Network.Digest);
 }
Ejemplo n.º 3
0
 private void Success()
 {
     NewsUtility.setNewsState(Network.Pub, Network.PubU, MonoSingleton <GameManager> .Instance.Player.IsFirstLogin);
     MonoSingleton <GameManager> .Instance.InitAlterHash(Network.Digest);
 }
Ejemplo n.º 4
0
 public static bool isNewsDisplay()
 {
     return(NewsUtility.getNewsTypes() != NewsUtility.NewsTypes.None);
 }
Ejemplo n.º 5
0
 private void checkNewsDisplay(WebAPI.JSON_BodyResponse <FlowNode_CheckVersion.Json_VersionInfo> res)
 {
     NewsUtility.setNewsState(res.body.pub, res.body.pub_u, MonoSingleton <GameManager> .Instance.Player.IsFirstLogin);
 }