123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System.Collections.Generic;
- namespace GFGGame
- {
- public class RedDotDataManager : SingletonBase<RedDotDataManager>
- {
- /// <summary>
- /// 公告
- /// 是否有未读公告
- /// </summary>
- /// <returns></returns>
- public bool GetNoticeRed()
- {
- List<NoticeInfo> noticeInfos = NoticeDataManager.Instance.NoticeInfos;
- for (int i = 0; i < noticeInfos.Count; i++)
- {
- if (noticeInfos[i].readStatus == false) return true;
- }
- return false;
- }
- /// <summary>
- /// 任务
- /// 是否有任务奖励、任务宝箱奖励可领
- /// </summary>
- /// <returns></returns>
- public bool GetTaskRed()
- {
- Dictionary<int, TaskInfo> taskInfo = DailyTaskDataManager.Instance.TaskInfo;
- foreach (int key in taskInfo.Keys)
- {
- if (DailyTaskDataManager.Instance.GetTaskStateById(key) == ConstBonusStatus.CAN_GET) return true;
- }
- Dictionary<int, int> livenessBoxInfos = DailyTaskDataManager.Instance.LivenessBoxInfos;
- foreach (int key in livenessBoxInfos.Keys)
- {
- if (DailyTaskDataManager.Instance.GetBoxStateById(key) == ConstBonusStatus.CAN_GET) return true;
- }
- return false;
- }
- /// <summary>
- /// 七天签到
- /// </summary>
- /// <returns></returns>
- public bool GetDailyLoginRed()
- {
- return ActivityDataManager.Instance.dailyLoginBonusStatus == ConstBonusStatus.CAN_GET;
- }
- /// <summary>
- /// 有邮件未读或未领奖励
- /// </summary>
- /// <returns></returns>
- public bool GetMailRed()
- {
- if (MailDataManager.Instance.UnreadCount > 0) return true;
- return false;
- }
- }
- }
|