| | |
| | | return _recentlyChat;
|
| | | }
|
| | |
|
| | | public void SaveLocalRecentlyChat()
|
| | | {
|
| | | for (int i = 0; i < recentlyChats.Count; i++)
|
| | | {
|
| | | var localKey = StringUtility.Contact("RecentlyChat_", PlayerDatas.Instance.baseData.PlayerID, "_", i);
|
| | | LocalSave.SetString(localKey, recentlyChats[i].ToString());
|
| | | }
|
| | | }
|
| | |
|
| | | void GetLocalRecentlyChat()
|
| | | {
|
| | | recentlyChats.Clear();
|
| | | for (int i = 0; i < RecentlyChatNum; i++)
|
| | | {
|
| | | var localKey = StringUtility.Contact("RecentlyChat_", PlayerDatas.Instance.baseData.PlayerID, "_", i);
|
| | | if (LocalSave.HasKey(localKey))
|
| | | {
|
| | | var json = LocalSave.GetString(localKey);
|
| | | if (!string.IsNullOrEmpty(json))
|
| | | {
|
| | | RecentlyChat chat;
|
| | | if (RecentlyChat.TryParse(json, out chat))
|
| | | {
|
| | | recentlyChats.Add(chat);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | if (RecentlyChatChangeEvent != null)
|
| | | {
|
| | | RecentlyChatChangeEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | recentlyChat = null;
|