示例#1
0
        /// <summary>
        /// Add listner and show pop
        /// </summary>
        private void Start()
        {
            //Disable Dev mode button listner
            m_DisableDevModeButton.onClick.AddListener(() =>
            {
                PopupHandler.ShowPopup("DISABLE_DEV_MODE", "OK", "QUIT", "", false, (PopUpButtonCallback _popCall) =>
                {
                    if (_popCall == PopUpButtonCallback.LEFT)
                    {
                        Debug.Log("Disable dev mode called here. Left");
                    }
                    else if (_popCall == PopUpButtonCallback.RIGHT)
                    {
                        Debug.Log("Disable dev mode called here. Right");
                    }
                });
            });

            //Alreay Register button listner
            m_AlreadyRegisterdButton.onClick.AddListener(() =>
            {
                PopupHandler.ShowPopup("ALREADY_REGISTERED", "LOGIN", "REGISTER", "", false, (PopUpButtonCallback _popCall) =>
                {
                    Debug.Log("ALREADY_REGISTERED called here.");
                });
            });

            //Location button listner
            m_LocationAccess.onClick.AddListener(() =>
            {
                PopupHandler.ShowPopupWithParams("LOCATION_ACCESS", "SETTING", "", true, (PopUpButtonCallback _popCall) =>
                {
                    Debug.Log("LOCATION_ACCESS called here.");
                });
            });

            //Hide all popup
            m_HideAll.onClick.AddListener(() =>
            {
                PopupHandler.Hide();
            });

            //Load main scene
            m_BackButton.onClick.AddListener(() =>
            {
                SceneManager.LoadScene("MainScene");
            });
        }