Esempio n. 1
0
        public void OnShowView(UIViewState state, UIView.UIViewDelegate handler)
        {
            if (state == UIViewState.OPENED)
            {
                isActionTermsOfServiceView = true;
                Debug.Log("[NMGPlayMode.UIViewManager] OPENED");
            }
            else if (state == UIViewState.FAILED)
            {
                isActionTermsOfServiceView = false;
                Debug.Log("[NMGPlayMode.UIViewManager] FAILED");
            }
            else if (state == UIViewState.CLOSED)
            {
                isActionTermsOfServiceView = false;
                Debug.Log("[NMGPlayMode.UIViewManager] CLOSED");
                NMGPlayerPrefs.SetTermsOfServiceViewShowed("True");
            }
            else if (state == UIViewState.REWARDED)
            {
                isActionTermsOfServiceView = false;
                Debug.Log("[NMGPlayMode.UIViewManager] REWARDED");
            }

            if (handler != null)
            {
                handler(state);
            }
        }
Esempio n. 2
0
        public int SetUIViewCallback(int location, UIView.UIViewDelegate callback)
        {
            if (null == callback)
            {
                return(0);
            }

            int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message)
            {
                Log.Debug("[UIViewCallback] UIViewCallback: " + message.ToString());

                int uiviewState = message.GetInt("uiviewState");

                if (uiviewState == 0)
                {
                    UIViewRotation.Instance.SetAutoRotation(location);
                }
                else if (uiviewState == 1)
                {
                    UIViewRotation.Instance.SetGameRotation(location);
                }

                if (null != callback)
                {
                    callback((UIViewState)uiviewState);
                }
            });

            return(handlerNum);
        }
Esempio n. 3
0
 public void Show(int location, UIView.UIViewDelegate callback)
 {
     if (location == 11001)
     {
         UIViewManager.Instance.ShowTermsOfServiceView(callback);
     }
 }
Esempio n. 4
0
        public void ShowTermsOfServiceView(UIView.UIViewDelegate handler)
        {
            string isShowed = NMGPlayerPrefs.GetTermsOfServiceViewShowed();

            if (!string.IsNullOrEmpty(isShowed))
            {
                Log.Debug("[NMGPlayMode.UIViewManager] Terms of service view is show only once.");

                OnShowView(UIViewState.CLOSED, handler);
                return;
            }

            if (SessionManager.SessionStatus.INITIALIZING == SessionManager.Instance.status)
            {
                SessionManager.Instance.waitForTermsOfService = true;
                SessionManager.Instance.termsOfServiceHandler = handler;
                return;
            }

            if (true == isActionTermsOfServiceView)
            {
                Log.Debug("[NMGPlayMode.UIViewManager] Terms of service view is progress.");

                OnShowView(UIViewState.FAILED, handler);
                return;
            }

            TermsOfServiceController.Show(OnShowView, handler);
        }
Esempio n. 5
0
        public static void Show(UIViewManager.ShowViewDelegate callback, UIView.UIViewDelegate handler)
        {
            Close();
            termsOfServicePanel = (GameObject)Instantiate(Resources.Load("NMGPlayModeTermsOfServiceView"));

            TermsOfServiceController controller = termsOfServicePanel.transform.FindChild("TermsOfServicePanel").gameObject.GetComponent <TermsOfServiceController>();

            controller.callback = callback;
            controller.handler  = handler;

            callback(UIViewState.OPENED, handler);
        }
Esempio n. 6
0
        public int SetUIViewCallback(UIView.UIViewDelegate callback)
        {
            if (null == callback)
            {
                return(0);
            }

            int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message)
            {
                Log.Debug("[UIViewCallback] UIViewCallback: " + message.ToString());

                int uiviewState = message.GetInt("uiviewState");

                if (null != callback)
                {
                    callback((UIViewState)uiviewState);
                }
            });

            return(handlerNum);
        }
 public void Show(int location, UIView.UIViewDelegate callback)
 {
 }
Esempio n. 8
0
        public void ShowForumWebView(UIView.UIViewDelegate callback)
        {
            int handlerNum = forumCallback.SetUIViewCallback(callback);

            nmg_forum_showForumWebView(handlerNum);
        }
        //
        public void Show(string url, string configuration, UIView.UIViewDelegate callback)
        {
            int handlerNum = uiviewCallback.SetUIViewCallback(callback);

            nmg_commonWebView_show_with_configuration(url, configuration, handlerNum);
        }
 public void ShowForumWebView(string guildId, UIView.UIViewDelegate callback)
 {
 }
 public void Show(string url, UIView.UIViewDelegate callback)
 {
 }
Esempio n. 12
0
        public void Show(string url, string configuration, UIView.UIViewDelegate callback)
        {
            int handlerNum = uiviewCallback.SetUIViewCallback(location, callback);

            commonWebViewClass.CallStatic("nmg_commonWebView_show", url, configuration, handlerNum);
        }
Esempio n. 13
0
        public void ShowForumWebView(string guildId, UIView.UIViewDelegate callback)
        {
            int handlerNum = forumCallback.SetUIViewCallback(location, callback);

            androidClass.CallStatic("nmg_forum_showForumWebViewWithGuildId", guildId, handlerNum);
        }
Esempio n. 14
0
        public void ShowForumWebView(UIView.UIViewDelegate callback)
        {
            int handlerNum = forumCallback.SetUIViewCallback(location, callback);

            androidClass.CallStatic("nmg_forum_showForumWebView", handlerNum);
        }
Esempio n. 15
0
        public void ShowForumWebView(string guildId, UIView.UIViewDelegate callback)
        {
            int handlerNum = forumCallback.SetUIViewCallback(callback);

            nmg_forum_showForumWebViewWithGuildId(guildId, handlerNum);
        }
Esempio n. 16
0
 public static void Show(string url, UIView.UIViewDelegate callback)
 {
     Log.Debug("[CommonWebView] Show");
     CommonWebViewImpl.Show(url, callback);
 }
Esempio n. 17
0
 public static void Show(string url, CommonWebViewConfiguration configuration, UIView.UIViewDelegate callback)
 {
     Log.Debug("[CommonWebView] Show");
     if (configuration.UseRotation)
     {
         UIViewRotation.Instance.SetRotation(COMMON_WEBVIEW, true);
     }
     else
     {
         UIViewRotation.Instance.SetRotation(COMMON_WEBVIEW, false);
     }
     CommonWebViewImpl.Show(url, configuration.ToJsonString(), callback);
 }
 public void Show(string url, string configuration, UIView.UIViewDelegate callback)
 {
 }
 public void ShowForumWebView(UIView.UIViewDelegate callback)
 {
 }
Esempio n. 20
0
        public void Show(int location, UIView.UIViewDelegate callback)
        {
            int handlerNum = uiviewCallback.SetUIViewCallback(location, callback);

            uiviewAndroidClass.CallStatic("nmg_uiview_show", location, handlerNum);
        }
        public void Show(string url, UIView.UIViewDelegate callback)
        {
            int handlerNum = uiviewCallback.SetUIViewCallback(callback);

            nmg_commonWebView_show(url, handlerNum);
        }
Esempio n. 22
0
 public static void ShowForumWebView(string guildId, UIView.UIViewDelegate callback)
 {
     Log.Debug("[ForumUIView] ShowForumWebView");
     ForumUIViewImpl.ShowForumWebView(guildId, callback);
 }
Esempio n. 23
0
        public void Show(int location, UIView.UIViewDelegate callback)
        {
            int handlerNum = uiviewCallback.SetUIViewCallback(callback);

            nmg_uiview_show(location, handlerNum);
        }
Esempio n. 24
0
 public static void ShowForumWebView(UIView.UIViewDelegate callback)
 {
     Log.Debug("[ForumUIView] ShowForumWebView");
     ForumUIViewImpl.ShowForumWebView(callback);
 }