void Recieve_STC_ERROR(ByteData _recieveBuffer) { byte Error_Code = 0; RecieveBuffer.OutPutVariable(ref Error_Code); ErrorCode errorCode = (ErrorCode)Error_Code; UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); switch (errorCode) { case ErrorCode.LOGIN_OVERLAP_MATCH: case ErrorCode.LOGIN_OVERLAP_BATTLE: case ErrorCode.LOGIN_OVERLAP_CHATTING: popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); // 알림 popup.SetPopupMessage(TextDataManager.Dic_TranslateText[248]); // 로그인 중복!\n 게임을 종료합니다. popup.Set_addEventButton(Application.Quit); break; case ErrorCode.ROOM_IS_FULL: popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); //알림 popup.SetPopupMessage(TextDataManager.Dic_TranslateText[507]); // 해당 방이 꽉 찼습니다. break; case ErrorCode.ROOM_IS_NULL: popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); popup.SetPopupMessage(TextDataManager.Dic_TranslateText[508]); // 해당 방이 존재하지 않습니다." break; default: break; } }
//클랜원수 변경시 호출 매서드 public void ResponseButton_ChangeNumOfClan() { User _user = UserDataManager.instance.user; if (isMaster) { if (_user.clan_Clans.PersonCnt >= 50) { UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); popup.SetPopupMessage(TextDataManager.Dic_TranslateText[161]); } else { int needGem = (_user.clan_Clans.PersonCnt - 5) + 1; UI_Popup_Selective popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Selective>(UIPOPUP.POPUPSELECTIVE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[162]); popup.SetPopupMessage(string.Format("{0}{1}", needGem, TextDataManager.Dic_TranslateText[163])); popup.Set_addEventButton(callback_AcceptChangeNumOfClan); } } else { //클랜원일떄 팝업 주석 //UI_Popup_Toast popupToast = UI_Manager.Getsingleton.CreatAndGetPopup<UI_Popup_Toast>(UIPOPUP.POPUPTOAST); //popupToast.SetPopupMessage(TextDataManager.Dic_TranslateText[159]);//클랜마스터만 변경할수있습니다 } }
void GetVersion() { // 로그인에 필요한 버전 값 전달 Ver = DefineKey.ReleaseVersion(); int UpdateVersion = 99; if (UserDataManager.instance.user.Market_versions.ContainsKey(DefineKey.Ver)) { UpdateVersion = Convert.ToInt32(UserDataManager.instance.user.Market_versions[DefineKey.Ver]); } Write_TitleLog("Complete CheckVersion..."); UserEditor.Getsingleton.EditLog("현재 어플 버젼 : " + Ver + " , 업데이트 버젼 : " + UpdateVersion); // 지금은 이렇지만, 클라버전 < 서버버전 이면 업데이트으로 수정해야함 버전은 int 형으로 if (Ver < UpdateVersion) { //서버 상태 비정상(점검등)이면 메세지띄움 UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); //알림 popup.SetPopupMessage(string.Format("업데이트가 필요합니다. 확인 누르면 마켓으로 이동합니다")); // 업데이트가 필요합니다. 확인 누르면 마켓으로 이동합니다7 popup.Set_addEventButton(() => Application.OpenURL(UserDataManager.instance.user.Market_versions[DefineKey.MktUrl])); } else { UserEditor.Getsingleton.EditLog("어플 버젼 맞음"); //그리고 로그인하러~~ Init_Login(); } }
void callback_JoinClan() { UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); //알림 popup.SetPopupMessage(string.Format(TextDataManager.Dic_TranslateText[164], clans.ClanName)); //~ 클랜에 가입요청을 하였습니다.가입요청이 수락이 되면 클랜에 가입이 됩니다" popup.Set_addEventButton(() => UI_Top.Getsingleton.set_refresh()); }
void callback_Complete_Acceptinvite() { UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); // 알림 popup.SetPopupMessage(string.Format("{0} {1}.", user_post.PostTxt, TextDataManager.Dic_TranslateText[183])); popup.Set_addEventButton(() => webRequest.ClanInfo(callback_Clear_OverlapedPost)); }
private string Set_ProtocalError(ProtocolName ptName) { //팝업 string errorMsg = string.Empty; string msg2 = TextDataManager.Dic_TranslateText[433]; //"네트워크가 불안정 합니다."; string msg1 = "네트워크 오류 발생하엿습니다. \n다시 시도해주세요"; switch (ptName) { case ProtocolName.CheckServer: case ProtocolName.GetVersion: case ProtocolName.SetMemberLogin: case ProtocolName.SetMemberJoin: case ProtocolName.SetMemberChange: case ProtocolName.GetAuthentication: case ProtocolName.GetReferenceDB: case ProtocolName.GetUserInfos: case ProtocolName.ClanInfo: case ProtocolName.FriendList: case ProtocolName.GetServerList: case ProtocolName.GetServerTime: UI_Popup_Notice popup3 = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup3.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); //알림 errorMsg = string.Format("{1}\n {0}", ptName, msg1); popup3.SetPopupMessage(errorMsg); if (UI_Manager.Getsingleton.Dic_UILst.ContainsKey(UI.TITLE)) { popup3.Set_addEventButton(exeption_gotoTitleUI); } else { popup3.Set_addEventButton(exeption_Stay); } break; default: UI_Popup_Notice popup2 = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup2.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); //알림 errorMsg = string.Format("{1}\n {0}", ptName, msg1); popup2.Set_addEventButton(exeption_Stay); popup2.SetPopupMessage(errorMsg); break; } return(errorMsg); }
//구매 실패 콜백함수 void purchaseFailedEvent(string error) { UserEditor.Getsingleton.EditLog("purchaseFailedEvent: " + error); isPurchasing = false; // loading UI false Loadmanager.instance.LoadingUI(false); UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice> (UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage("구매실패"); popup.SetPopupMessage(error); }
public static IEnumerator routine_waitForInAppProducts(del_NextProcess nextProcess) { if (InAppPurchaseManager.instance.IsGetQueryInventory == false) { Loadmanager.instance.LoadingUI(true); User.isSelectedCharacter = true; float time = 0; while (true) { time += Time.deltaTime; if (InAppPurchaseManager.instance.IsGetQueryInventory == true) { Loadmanager.instance.LoadingUI(false); User.isSelectedCharacter = false; if (nextProcess != null) { nextProcess(); } break; } if (time > 5) { Loadmanager.instance.LoadingUI(false); User.isSelectedCharacter = false; UI_Popup_Notice pop = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); pop.Set_PopupTitleMessage("알림"); pop.SetPopupMessage("상품 정보를 받아오지 못하였습니다. \n 다시 시도 바랍니다."); break; } yield return(null); } } else { if (nextProcess != null) { nextProcess(); } yield return(null); } }
void ConnetingRryFailProcess() { UserEditor.Getsingleton.EditLog("2회 연결시도 실패 해서 타이틀 보냄"); //연결 실패 ConnectLogin_State = MMSERVER_STATE.CONNECT_FAIL; //로딩바 Loadmanager.instance.LoadingUI(false); UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); //알림 popup.SetPopupMessage(string.Format("{0} \n {1}", TextDataManager.Dic_TranslateText[433], TextDataManager.Dic_TranslateText[434])); //네트워크가 불안정합니다 , 네트워크 확인해주세요 popup.Set_addEventButton(callback_connectingfail); connectingTry_Count = 0; }
void Recieve_STC_PopupMsg(ByteData _recieveBuffer) { //string : 공지 메세지 //bool : true(확인 터치시 어플종료), false(팝업만 띄움) string popupMsg = _recieveBuffer.Getstring(); bool isOut = _recieveBuffer.Getbool(); UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.transform.SetAsLastSibling(); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); //알림 popup.SetPopupMessage(popupMsg); if (isOut) { popup.Set_addEventButton(Application.Quit); } }
IEnumerator tryServerCheck() { Loadmanager.instance.LoadingUI(true); Start_ServerCheck(); while (true) { if (isCompleteServerChk == true) { UserEditor.Getsingleton.EditLog("다시 서버체크 완료 끝"); ct_CheckServer = null; break; } yield return(new WaitForSeconds(2f)); if (isCompleteServerChk == false) { if (tryWebCheckServerCount >= 5) { //로딩바 안사라졋으니 사라지게하자 Loadmanager.instance.LoadingUI(false); UserEditor.Getsingleton.EditLog("5번 체크 시도 완료 팝업알림!"); UI_Popup_Notice popup2 = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup2.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); //알림 popup2.Set_addEventButton(startRoutine_TryServerCheck); popup2.SetPopupMessage(TextDataManager.Dic_TranslateText[433]); //네트워크 불안정합니다. ct_CheckServer = null; tryWebCheckServerCount = 0; break; } else { UserEditor.Getsingleton.EditLog("다시 서버체크시도 횟수:" + tryWebCheckServerCount); //팝업창띄어진거 잇으면 없애기 UI_Manager.Getsingleton.ClearPopupUI(); Start_ServerCheck(); } } yield return(null); } }
public void RecieveError_EndProcess() { Scene _scene = SceneManager.GetActiveScene(); if (_scene.name == DefineKey.Main) { if (UI_Manager.Getsingleton.Dic_UILst.ContainsKey(UI.LOBBY)) { //ConnectLogin_State = MMSERVER_STATE.RECONNECT_START; Operation_State = MMSERVER_STATE.IDEL; //로딩바있을수 있으니 로딩방 false Loadmanager.instance.LoadingUI(false); UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); //알림 popup.SetPopupMessage(string.Format("{0} \n {1}", TextDataManager.Dic_TranslateText[433], TextDataManager.Dic_TranslateText[434])); //popup.Set_addEventButton(callback_ConfirmError); } } }
//소켓 에러 리시브 public void RecieveError_Process() { Scene _scene = SceneManager.GetActiveScene(); if (_scene.name == DefineKey.Main) { //재연결 작동 시작~ //ConnectLogin_State = MMSERVER_STATE.RECONNECT_START; Operation_State = MMSERVER_STATE.IDEL; if (UI_Manager.Getsingleton.Dic_UILst.ContainsKey(UI.CUSTOMROOM)) { //팝업 UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); //알림 popup.SetPopupMessage(string.Format("{0} \n {1}", TextDataManager.Dic_TranslateText[433], TextDataManager.Dic_TranslateText[434])); //로비로 이동 Transform _canvasTr = UI_Manager.Getsingleton.CanvasTr; UI_Manager.Getsingleton.CreatUI(UI.LOBBY, _canvasTr); UI_Manager.Getsingleton.CreatUI(UI.TOP, _canvasTr); } } else { //모든팝업 클리어하기 UI_Manager.Getsingleton.ClearPopupUI(); UI_Manager.Getsingleton.ClearALL_UI(); UI_Manager.Getsingleton._UI = UI.LOBBY; SceneManager.LoadScene(DefineKey.Main); Operation_State = MMSERVER_STATE.ERROR_END; } }
//구글계정연동시도 완료시 콜백 public void Login_GoogleID(bool success) { if (success) // 구글계정 연결에 성공했다. { Write_TitleLog("Login google account..."); UserEditor.Getsingleton.EditLog(" 구글 계정으로 로그인~"); selectedPlatform = PLATFORM_TYPE.GOOGLE; User _user = UserDataManager.instance.user; _user.user_logins.Lgnkey = PlatformManager.Getsingleton.Platform_UserID; _user.user_logins.Email = PlatformManager.Getsingleton.Platform_UserEmail; _user.user_logins.PlfID = (byte)selectedPlatform; //구글 if (_user.user_Users.UserID != 0 && _user.user_logins.PlfID != (byte)PLATFORM_TYPE.GOOGLE) // 로그인 했엇다. 플랫폼 전환을 한다. { //플랫폼 전환이 완료되면 로그인으로.. ChangePlatform(); } else { //로그인시도 Start_login(); } } else { selectedPlatform = PLATFORM_TYPE.NONE; PlatformManager.Getsingleton.Save_NowUsePlatformIndex((int)selectedPlatform); UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); popup.SetPopupMessage(TextDataManager.Dic_TranslateText[220]); // 구글 계정 연결 실패 하였습니다 //다시 계정띄우는곳으로 popup.Set_addEventButton(Init_Login); } }
public void Login_Facebook(bool sucess) { if (sucess) // 페북계정 연결에 성공했다. { UserEditor.Getsingleton.EditLog(" 페북 계정으로 로그인~"); User _user = UserDataManager.instance.user; _user.user_logins.Lgnkey = PlatformManager.Getsingleton.Platform_UserID; _user.user_logins.Email = PlatformManager.Getsingleton.Platform_UserEmail; _user.user_logins.PlfID = (int)PLATFORM_TYPE.FACEBOOK; //페북 UserEditor.Getsingleton.EditLog("key :" + _user.user_logins.Lgnkey + "email : " + _user.user_logins.Email); if (_user.user_Users.UserID != 0) //아이디가 유효하면 { //플랫폼 전환이 완료되면 로그인으로.. UserEditor.Getsingleton.EditLog(string.Format("계정전환~ userID : {0},plfID :{1}, lgnKey :{2} , Email : {3}" , _user.user_Users.UserID, _user.user_logins.PlfID, _user.user_logins.Lgnkey, _user.user_logins.Email)); webRequest.SetMemeberChange(_user.user_logins.PlfID, _user.user_logins.Lgnkey, _user.user_logins.Email, callback_Complete_ChangePlatform); } else { UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); popup.SetPopupMessage(TextDataManager.Dic_TranslateText[221]); //페이스북 계정 연결 실패 하였습니다 Fail_ChangePlatform(); } } else { UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); popup.SetPopupMessage(TextDataManager.Dic_TranslateText[221]); //페이스북 계정 연결 실패 하였습니다 Fail_ChangePlatform(); } }
public void Login_GameCenter(bool success) { if (success) { UserEditor.Getsingleton.EditLog(" 게임센터 계정으로 로그인~"); User _user = UserDataManager.instance.user; _user.user_logins.Lgnkey = PlatformManager.Getsingleton.Platform_UserID; _user.user_logins.Email = PlatformManager.Getsingleton.Platform_UserEmail; _user.user_logins.PlfID = (int)PLATFORM_TYPE.GAMECENTER; //페북 UserEditor.Getsingleton.EditLog(" user id : " + _user.user_Users.UserID + "PlfID : " + _user.user_Users.PlfID); if (_user.user_Users.UserID != 0) //아이디가 유효하면 { //플랫폼 전환이 완료되면 로그인으로.. webRequest.SetMemeberChange(_user.user_logins.PlfID, _user.user_logins.Lgnkey, _user.user_logins.Email, callback_Complete_ChangePlatform); } else { UserEditor.Getsingleton.EditLog(" user id or plfID not matched"); UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); // 알림 popup.SetPopupMessage(TextDataManager.Dic_TranslateText[273]); // 게임센터 계정 연결 실패 하였습니다 Fail_ChangePlatform(); } } else { UserEditor.Getsingleton.EditLog("gamecenter login fail"); UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); // 알림 popup.SetPopupMessage(TextDataManager.Dic_TranslateText[273]); // 게임센터 계정 연결 실패 하였습니다 Fail_ChangePlatform(); } }
IEnumerator coroutine_SendProtocol(netData _pnet) { string _url = ""; if (_pnet.protocolName == ProtocolName.CheckServer) // 서버 상태 프로토콜 { _url = DefineKey.CheckServerURL; } else { _url = string.Format("{0}{1}/{2}", URL, ProtocolForder[(int)((int)_pnet.protocolName / 10)], _pnet.protocolName.ToString()); } www = _pnet.get_WebSend(_url); if (!isNetworking) { isNetworking = true; Loadmanager.instance.LoadingUI(isNetworking); if (waitCoroutine != null) { StopCoroutine(waitCoroutine); } webWorkingLog = string.Format("Try Request data {0}", _pnet.protocolName); UserEditor.Getsingleton.EditLog(string.Format("{0} networking : {1}", _pnet.protocolName, isNetworking)); } yield return(www.SendWebRequest()); try { #if UNITY_EDITOR UserEditor.Getsingleton.EditLog(string.Format("return : <b><color=#28ff65>{0}</color></b>", www.downloadHandler.text)); #endif string _jsonData = www.downloadHandler.text; object _jsonObject = MiniJSON.Json.Deserialize(_jsonData); Dictionary <string, object> _dicInfo = (Dictionary <string, object>)_jsonObject; //반환데이터 오류에대한 bool 값 초기화 webResponse.Resp_Error = false; //갱신 데이터 체크 if (_pnet.protocolName == ProtocolName.CheckServer) { webResponse.ResponseWeb_CheckServer(UserDataManager.instance.user, _dicInfo); } else if (_pnet.protocolName == ProtocolName.GetServerList) { webResponse.ResponseWeb_GetServerList(UserDataManager.instance.user, _dicInfo); } else if (_pnet.protocolName == ProtocolName.GetVersion) { webResponse.ResponseWeb_GetVersion(UserDataManager.instance.user, _dicInfo); } else if (_pnet.protocolName == ProtocolName.GetServerTime) { webResponse.ResponseWeb_serverTime(_dicInfo); } else if (_pnet.protocolName == ProtocolName.GetConnectAdress) { webResponse.ResponseWeb_GetConnectAdress(UserDataManager.instance.user, _dicInfo); } else if (_pnet.protocolName == ProtocolName.GetReferenceDB) { TableDataManager.instance.Set_tableData(_dicInfo); } else if (_pnet.protocolName == ProtocolName.PostGetList) { webResponse.ResponseWeb_GetPostList_Data(UserDataManager.instance.user, _dicInfo); } else if (_pnet.protocolName == ProtocolName.UnitExpRanking) { webResponse.ResponseWeb_GetUnitExpRanking_Data(UserDataManager.instance.user, _dicInfo); } else if (_pnet.protocolName == ProtocolName.ClanList) { webResponse.ResponseWebClanList_Data(UserDataManager.instance.user, _dicInfo); } else if (_pnet.protocolName == ProtocolName.FriendList) { webResponse.ResponseWeb_FriendsList_Data(UserDataManager.instance.user, _dicInfo); } else if (_pnet.protocolName == ProtocolName.FriendGetInviteUrl) { webResponse.ResponseWeb_FriendInviteUrl_Data(UserDataManager.instance.user, _dicInfo, string.Format("{0}{1}/", URL, ProtocolForder[(int)((int)_pnet.protocolName / 10)])); } else if (_pnet.protocolName == ProtocolName.SetMemberChange) { webResponse.ResponseWeb_MemberChange(_dicInfo); } else { webResponse.Get_ListGainitem(_dicInfo); webWorkingLog = string.Format("complete {0} data", _pnet.protocolName); #if UNITY_EDITOR UserEditor.Getsingleton.EditLog(webWorkingLog); #endif } www = null; // 불러서 또 쏠거 있는지 체크하자 Send_WebProtocol(); //콜백함수가 있다면 콜백함수 부르자 if (_pnet.del_result != null && !webResponse.Resp_Error) //매서드가 널이 아니고 에러가 아니면 { _pnet.del_result(); } if (isWebException) { isWebException = false; } } catch (Exception e) { UserEditor.Getsingleton.EditLog(e); if (isWebException == false) { isWebException = true; //www 널로 www = null; // 로딩바 끄기 isNetworking = false; Loadmanager.instance.LoadingUI(isNetworking); Scene _scene = SceneManager.GetActiveScene(); if (_scene.name == DefineKey.Main) //메인씬일때만 { Set_ProtocalError(_pnet.protocolName); //User _user = UserDataManager.instance.user; //if (_user.user_Users.UserID != 0) // popup.SetPopupMessage(string.Format("User ID : {0} \n\n {1}", _user.user_Users.UserID, Set_ProtocalError(_pnet.protocolName))); //else // popup.SetPopupMessage(Set_ProtocalError(popup,_pnet.protocolName)); //popup.Set_addEventButton(goto_TitleUI); } else { //팝업 UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage("오류"); popup.SetPopupMessage(string.Format("Network Error,\n Please Restart SuddenGround App \n\n\nError : {0} Network Error", _pnet.protocolName)); popup.Set_addEventButton(Application.Quit); } } else { //www 널로 www = null; // exeption_gotoTitleUI(); } } }
void CheckServerInfo() { //코루틴떄메 두번이상 들어오는경우가 발생 이미 true 라면 리턴떄리자 if (isCompleteServerChk == true) { return; } isCompleteServerChk = true; if (ct_CheckServer != null) { StopCoroutine(ct_CheckServer); ct_CheckServer = null; } //서버 체크 시도 횟수카운트 초기화 tryWebCheckServerCount = 0; Server_infos server_info = UserDataManager.instance.user.server_Info; UserEditor.Getsingleton.EditLog("전달 받은 웹서버 IP :" + server_info.WebSvIp); #if UNITY_EDITOR web_Manager.Getsingleton.URL = string.Format("{0}/", server_info.WebSvIp); //web_Manager.Getsingleton.URL = string.Format("{0}/", "http://192.168.0.9:40005"); #else web_Manager.Getsingleton.URL = string.Format("{0}/", server_info.WebSvIp); //web_Manager.Getsingleton.URL = string.Format("{0}/", "http://192.168.0.9:40005"); #endif Write_TitleLog("CheckServer Complete..."); //test //server_info.SvStatus = 1; if (server_info.SvStatus == 0) //서버상태 : 정상 { //버전체크하기 Start_CheckVersion(); UserEditor.Getsingleton.EditLog("서버체크 완료"); } else { UserEditor.Getsingleton.EditLog("서버체크 비정상 점검중"); //서버 상태 비정상(점검등)이면 메세지띄움 //치트 사용 (오른쪽상단에서 왼쪽 하단으로 드래그후 비번입력 (비번 : dyg1018)) UseCheatWhenChkServer(); UI_Popup_Notice popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Notice>(UIPOPUP.POPUPNOTICE); popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); if (server_info.SvChkTm > DateTime.MinValue) { TimeSpan span = server_info.SvChkTm - server_info.ServerTime; if (span.Days > 0) { popup.SetPopupMessage(string.Format("{0}\n\n {1} : {2}{3} {4}{5}", server_info.SvChkMsg, TextDataManager.Dic_TranslateText[176], span.Days, TextDataManager.Dic_TranslateText[181], span.Hours, TextDataManager.Dic_TranslateText[180])); } else if (span.Hours > 0) { popup.SetPopupMessage(string.Format("{0}\n\n {1} : {2}{3} {4}{5}", server_info.SvChkMsg, TextDataManager.Dic_TranslateText[176], span.Hours, TextDataManager.Dic_TranslateText[180], span.Minutes, TextDataManager.Dic_TranslateText[179])); } else if (span.Minutes > 0) { popup.SetPopupMessage(string.Format("{0}\n\n {1} : {2}{3}", server_info.SvChkMsg, TextDataManager.Dic_TranslateText[176] , span.Minutes, TextDataManager.Dic_TranslateText[179])); } else { popup.SetPopupMessage(string.Format("{0}\n\n {1} : 1{2}", server_info.SvChkMsg, TextDataManager.Dic_TranslateText[176], TextDataManager.Dic_TranslateText[179])); } } else { popup.SetPopupMessage(string.Format("{0}", server_info.SvChkMsg)); } popup.Set_addEventButton(() => Application.Quit()); } }