public void LoginClick() { //table에 초기데이터로 하나 넣은게 있기 때문에 TableMng.Ins.playerTb.GetTable().Count == 1이면 회원가입이 안돼있음 if (TableMng.Ins.playerTb.GetTable().Count > 1) { JsonMng.Ins.JsonLoad(); } var tb = ExtensionMethod.GetLoginTb(idText.text); if (tb != null) { //Debug.LogError("아이디 있슴"); //Debug.LogError(tb.strName); if (pwText.text == tb.strPw) { //Debug.LogError(pwText.text); //Debug.LogError(tb.strPw); //Debug.LogError("비번도 같음"); //Debug.LogError("로그인 성공"); SetVisible(false); } else { popup.SetVisible(true); Debug.LogError("비밀번호가 다름"); return; } } else { popup.SetVisible(true); Debug.LogError("아이디와 패스워드가 존재 하지 않음"); return; } Player.Ins.Init(idText.text, tb.nID); SceneManager.LoadScene((int)eScene.LobbyScene); }
//회원가입 public void ContinueClick() { var tb = ExtensionMethod.GetLoginTb(idText.text); //ID가 있다 if (tb != null) { popup.SetVisible(true); Debug.LogError("아이디 중복"); return; } LoginData data = new LoginData(); PlayerData playerData = new PlayerData(); //공백 if (idText.text == "" || pwText.text == "") { popup.SetVisible(true); Debug.LogError("ID와PW를 입력"); return; } else { int nID = TableMng.Ins.LoginIdx; data.nID = nID; data.strName = idText.text; data.strPw = pwText.text; TableDownloader1.Ins.m_TbWWW.PostDB(eTableType.GoogleForm.ToDesc(), typeof(LoginData), data.PostData()); Debug.LogError("회원가입 성공"); SetVisible(false); login.idText.text = ""; login.pwText.text = ""; login.SetVisible(true); } }