123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using ET;
- using FairyGUI;
- using UnityEngine;
- namespace GFGGame
- {
- public class PoemGalleryDataManager : SingletonBase<PoemGalleryDataManager>
- {
- /// <summary>
- /// 推荐Id数据
- /// </summary>
- public List<long> RecommendInfos = new List<long>();
- /// <summary>
- /// 好友Id数据
- /// </summary>
- public List<long> FrinedInfos = new List<long>();
- /// <summary>
- /// 收藏Id数据
- /// </summary>
- public List<long> FavoriteInfos = new List<long>();
- /// <summary>
- /// 我的作品Id数据
- /// </summary>
- public List<long> MySelfInfos = new List<long>();
- private Dictionary<long, PoemGalleryData> _dicGalleryInfo = new Dictionary<long, PoemGalleryData>();
- public void Clear()
- {
- _dicGalleryInfo.Clear();
- RecommendInfos.Clear();
- FrinedInfos.Clear();
- FavoriteInfos.Clear();
- MySelfInfos.Clear();
- }
- public void AddGalleryData(PoemGalleryData data)
- {
- _dicGalleryInfo.Add(data.PictureId, data);
- }
- public void RemoveGalleryData(PoemGalleryData data)
- {
- if (_dicGalleryInfo.ContainsKey(data.PictureId))
- {
- _dicGalleryInfo.Remove(data.PictureId);
- }
- }
- public void UpdateGalleryData(PoemGalleryData data)
- {
- if (_dicGalleryInfo.ContainsKey(data.PictureId))
- {
- _dicGalleryInfo.Remove(data.PictureId);
- }
- }
- public PoemGalleryData GetGalleryDataById(long pictureId)
- {
- if (_dicGalleryInfo.ContainsKey(pictureId))
- {
- return _dicGalleryInfo[pictureId];
- }
- return null;
- }
- }
- }
|