/// <summary> /// 清除记录 /// </summary> /// <param name="type">Type.</param> public void ClearPublicChatRecord(Chat.WindowType type) { if (mPublicRecordDict.ContainsKey(type)) { mPublicRecordDict[type].Clear(); } }
public string ParseColorChat(Chat.WindowType type, SMsgChat_SC sChat) { string str = ""; switch (type) { case Chat.WindowType.Team: case Chat.WindowType.Town: case Chat.WindowType.Private: case Chat.WindowType.World: { if (sChat.senderActorID != mMyActorID) { str = NGUIColor.SetTxtColor(sChat.SenderName + " : ", TextColor.ChatBlue) + NGUIColor.SetTxtColor(sChat.Chat, TextColor.white); } else { str = NGUIColor.SetTxtColor(sChat.SenderName + " : ", TextColor.ChatGreen) + NGUIColor.SetTxtColor(sChat.Chat, TextColor.ChatYellow); } } break; case Chat.WindowType.System: str = NGUIColor.SetTxtColor(":" + sChat.Chat, TextColor.ChatOrange); break; } return(str); }
public void AddPublicRecord(Chat.WindowType type, SMsgChat_SC sChat) { if (mMyActorID == 0) { mMyActorID = PlayerManager.Instance.FindHeroDataModel().ActorID; } if (!mPublicRecordDict.ContainsKey(type)) { mPublicRecordDict.Add(type, new List <SMsgChat_SC>()); } mPublicRecordDict[type].AddChatRecord(sChat); }
/// <summary> /// 获取公共聊天记录 /// </summary> /// <returns>The world chat record list.</returns> public List <SMsgChat_SC> GetPublicChatRecordList(Chat.WindowType type) { if (mMyActorID != PlayerManager.Instance.FindHeroDataModel().ActorID) { mPublicRecordDict.Clear(); mMyActorID = PlayerManager.Instance.FindHeroDataModel().ActorID; } if (!mPublicRecordDict.ContainsKey(type)) { mPublicRecordDict.Add(type, new List <SMsgChat_SC>()); } return(mPublicRecordDict[type]); }