Пример #1
0
                } // end OnComfirmEndEdit

                private void OnClickRegisterBtn() {
                    if (userNameInput.text == "" || userNameInput.text == null || 
                        passwordInput.text == "" || passwordInput.text == null ||
                        comfirmInput.text == "" || comfirmInput.text == null) return;
                    // end if
                    if (passwordInput.text != comfirmInput.text) {
                        comfirmWarningGo.SetActive(true);
                        return;
                    } else if (comfirmWarningGo.activeSelf) {
                        comfirmWarningGo.SetActive(false);
                    } // end if
                    if (false == SqliteManager.RegisterPlayer(userNameInput.text, comfirmInput.text)) {
                        ObjectTool.InstantiateGo("MessageBoxUI", ResourcesTool.LoadPrefabUI("message_box_ui"),
                            SceneManager.mainCanvas.rectTransform).AddComponent<UIMessageBox>().SetMessage("注册失败");
                    } else {
                        ObjectTool.InstantiateGo("MessageBoxUI", ResourcesTool.LoadPrefabUI("message_box_ui"),
                            SceneManager.mainCanvas.rectTransform).AddComponent<UIMessageBox>().SetMessage("注册成功", OnClickBackBtn);
                    } // end if
                } // end OnClickRegisterBtn