///////////////////////===============================================================================================////////////////////////////////// ///////////////////////=========================== 채팅관련 ================================////////////////////////////////// ///////////////////////===============================================================================================////////////////////////////////// //입력완료시 public void ResponseInput_End() { input_chat.gameObject.SetActive(false); if (!input_chat.wasCanceled) { txtChat = input_chat.text; if (!string.IsNullOrEmpty(txtChat)) { Debug.Log("txtChat : " + txtChat); //욕설인지 체크 : 욕설은 *로 바껴서 나옴 TextDataManager.Chk_BannedLetter(ref txtChat); //채팅메세지 데이터 보내기 Network_MainMenuSoketManager.Getsingleton.Send_CTS_ChatMessage(1, txtChat); } else { Debug.Log("empty"); input_chat.text = ""; } } else { Debug.Log("cancle"); } input_chat.text = ""; }
public void SetLanguage(LanguageCode _lang) { TextDataManager.GetTextData(_lang); //for (int i = 0; i < list_Tranlatelst.Count; i++) // list_Tranlatelst[i].Refresh(); }
//킬문구 변경 public void ResponseInput_EndChangeKillMsg() { User _user = UserDataManager.instance.user; if (!lst_InputGame[1].wasCanceled) { string changedName = lst_InputGame[1].text; if (!TextDataManager.Chk_BannedLetter(ref changedName)) { webRequest.SetWords(lst_InputGame[1].text, callback_complete_ChangeKillmsg); changedTxt = lst_InputGame[1].text; lst_InputGame[1].text = ""; } else { UI_Popup_Toast popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Toast>(UIPOPUP.POPUPTOAST); popup.SetPopupMessage(TextDataManager.Dic_ErrorCode[111]); //사용 불가능한 문자열이 포함 되어있습니다. Set_AccounInfo(); lst_InputGame[1].text = ""; } } else { if (_user.User_Words.ContainsKey(USERWORD_TYPE.WRD_KILL)) { text_Killmsg.text = _user.User_Words[USERWORD_TYPE.WRD_KILL].Words; } } }
private void Awake() { Instance = this; textUIManager = new TextUIManager(gameObject.GetComponentInChildren <GroupTextUI>()); string[] tempData = TextAssetTool.ReadTextAssetData("Text/sampleDialogue"); foreach (string data in tempData) { string[] seperatedData = data.Split('-'); foreach (string datak in seperatedData) { Debug.Log(datak); } if (seperatedData.Length == 3) { DialogueData dialogueData = new DialogueData(seperatedData[0], TextAssetTool.ConvertNumberStringToInt(seperatedData[1], ':'), seperatedData[2].Split(';')); AddEventTextToDatabase(dialogueData.GetDialogueKey(), dialogueData); Debug.LogWarning(string.Format("The key {0} is added", dialogueData.GetDialogueKey())); } else { Debug.LogError("GO F**K URSELF"); } } Debug.LogWarning("TextDataManager initialized"); }
private void updateContactPreview() { string[] contacts = TextDataManager.GetContactList(); if (contacts != null) { for (int i = 0; i < contacts.Length; i++) { TextDataManager.Conversation coversation = TextDataManager.GetMessage(contacts[i], TextDataManager.GetMessageCount(contacts[i]) - 1); m_contactsList[i].UnfinishedMessage = false; m_contactsList[i].SetName(contacts[i]); m_contactsList[i].SetMessage(coversation.message); } } string[] newMessageContacts = TextMsgObjManager.GetSpeakerList(); if (newMessageContacts != null) { bool nameFound; for (int i = 0; i < newMessageContacts.Length; i++) { string message; GameObject go; ContactControl newContact; if (TextMsgObjManager.TryGetCurrentMsg(newMessageContacts[i], out message) || TextMsgObjManager.TryGetLastMessage(newMessageContacts[i], out message)) { nameFound = false; for (int j = 0; j < m_contactsList.Count; j++) { if (m_contactsList[j].CurrentName == newMessageContacts[i]) { m_contactsList[j].UnfinishedMessage = true; m_contactsList[j].SetMessage(message); m_contactsList[j].transform.SetAsFirstSibling(); nameFound = true; return; } } if (!nameFound) { go = Instantiate(ContactPrefab, ContactContainer); newContact = go.GetComponent <ContactControl>(); m_contactsList.Add(newContact); newContact.UnfinishedMessage = true; newContact.SetName(newMessageContacts[i]); newContact.SetMessage(message); newContact.transform.SetAsFirstSibling(); } } } } }
void RequestClanNameChange() { //욕설인지 체크 if (!TextDataManager.Chk_BannedLetter(ref changedName)) { webRequest.ClanNameChange(5, changedName, Respons_delegate); } else { UI_Popup_Toast popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Toast>(UIPOPUP.POPUPTOAST); popup.SetPopupMessage(TextDataManager.Dic_ErrorCode[111]); //사용 불가능한 문자열이 포함 되어있습니다. inputfield_changeName.text = ""; } }
// 클랜 소개글 input 이 끝난 뒤 호출 되는 매서드 public void ResponseInput_End_ChangeIntro() { changedClanIntroTxt = input_ClanIntro.text; input_ClanIntro.gameObject.SetActive(false); if (!TextDataManager.Chk_BannedLetter(ref changedClanIntroTxt)) { webRequest.ClanInfoTxtChange(changedClanIntroTxt, null); } else { UI_Popup_Toast popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Toast>(UIPOPUP.POPUPTOAST); popup.SetPopupMessage(TextDataManager.Dic_ErrorCode[111]); //사용 불가능한 문자열이 포함 되어있습니다. input_ClanIntro.text = ""; } }
private void updateContactList() { if (m_contactsList.Count < TextDataManager.GetContactCount()) { for (int i = m_contactsList.Count; i < TextDataManager.GetContactCount(); i++) { GameObject go = Instantiate(ContactPrefab, ContactContainer); m_contactsList.Add(go.GetComponent <ContactControl>()); } } else if (m_contactsList.Count > TextDataManager.GetContactCount()) { for (int i = m_contactsList.Count - 1; i >= TextDataManager.GetContactCount(); i--) { DestroyImmediate(m_contactsList[m_contactsList.Count - 1].gameObject); m_contactsList.RemoveAt(m_contactsList.Count - 1); } } }
public void ReseponseInput_writeEnd() { string bodText = input_write.text; if (!string.IsNullOrEmpty(bodText)) { if (!TextDataManager.Chk_BannedLetter(ref bodText)) { webRequest.ClanBodWrite(bodText, callback_Complete_writeBoard); input_write.text = ""; } else { UI_Popup_Toast popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Toast>(UIPOPUP.POPUPTOAST); popup.SetPopupMessage(TextDataManager.Dic_ErrorCode[111]); //사용 불가능한 문자열이 포함 되어있습니다. input_write.text = ""; } } }
//클랜생성 public void ResponseButton_ClanCreate() { if (createClanName == null || createClanName.Length <= 1) { UI_Popup_Toast popuptoast = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Toast>(UIPOPUP.POPUPTOAST); popuptoast.SetPopupMessage(TextDataManager.Dic_TranslateText[152]); return; } else { if (!TextDataManager.Chk_BannedLetter(ref createClanName)) { webRequest.ClanMake(createClanName, callback_complete_CreateClan); } else { UI_Popup_Toast popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Toast>(UIPOPUP.POPUPTOAST); popup.SetPopupMessage(TextDataManager.Dic_ErrorCode[111]); //사용 불가능한 문자열이 포함 되어있습니다. input_ClanCreate.text = ""; } } }
// Use this for initialization void Start() { TdManager = this.transform.GetComponent <TextDataManager>(); string text = TdManager.ReadText("/pcparam.txt"); // 改行ごとに文字列を格納 string[] lines = text.Split(new string[] { "\r\n" }, StringSplitOptions.None); for (int i = 0; i < lines.Length; i++) { // 改行時の文字列""(EOF)は無視 if (lines[i] != "") { string ifobj = "InputField" + (i + 1); // =より後ろの値を取得 string[] value = lines[i].Split(new string[] { "=" }, StringSplitOptions.None); Transform IFObj = GameObject.Find(ifobj).transform; InputField tx = IFObj.GetComponent <InputField>(); // 表示するテキストに設定 tx.text = value[1].ToString(); Debug.Log(value[0] + ":" + value[1]); } } }
//유저이름 변경 public void ResponseInput_EndChangeName() { User _user = UserDataManager.instance.user; if (!lst_InputGame[0].wasCanceled) { if (_user.User_Times.ContainsKey((int)TIMEIDX.USERNAME)) { User_Times Usertime = _user.User_Times[(int)TIMEIDX.USERNAME]; if (Usertime.Etime >= TimeManager.Instance.Get_nowTime()) { //토스트팝업 UI_Popup_Toast popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Toast>(UIPOPUP.POPUPTOAST); popup.SetPopupMessage(TextDataManager.Dic_TranslateText[244]); //이름변경은 1일 1회 입니다. Set_AccounInfo(); lst_InputGame[0].text = ""; } else { string changedName = lst_InputGame[0].text; if (!TextDataManager.Chk_BannedLetter(ref changedName)) { webRequest.UserNameChange(lst_InputGame[0].text, 0, callback_complete_changeName); lst_InputGame[0].text = ""; } else { UI_Popup_Toast popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Toast>(UIPOPUP.POPUPTOAST); popup.SetPopupMessage(TextDataManager.Dic_ErrorCode[111]); //사용 불가능한 문자열이 포함 되어있습니다. Set_AccounInfo(); lst_InputGame[0].text = ""; } } } else { string changedName = lst_InputGame[0].text; if (!TextDataManager.Chk_BannedLetter(ref changedName)) { webRequest.UserNameChange(lst_InputGame[0].text, 0, callback_complete_changeName); lst_InputGame[0].text = ""; } else { UI_Popup_Toast popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Toast>(UIPOPUP.POPUPTOAST); popup.SetPopupMessage(TextDataManager.Dic_ErrorCode[111]); //사용 불가능한 문자열이 포함 되어있습니다. Set_AccounInfo(); lst_InputGame[0].text = ""; } } } else { text_NkNm.text = _user.user_Users.NkNm; } }
public void Start() { idk = TextDataManager.Instance; }
public string GetDialogueKey() { return(TextDataManager.ConvertEventToKey(eventName, eventIndex)); }
/// <summary> /// 채팅메세지 보내기 /// </summary> public void Send_ChatMessage(string msg) { //욕설인지 체크 : 욕설은 *로 바껴서 나옴 TextDataManager.Chk_BannedLetter(ref msg); Network_MainMenuSoketManager.Getsingleton.Send_CTS_ChatMessage(1, msg); }