| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | 
							- using ET;
 
- using System.Collections;
 
- using System.Collections.Generic;
 
- using System.Threading.Tasks;
 
- using UnityEngine;
 
- namespace GFGGame
 
- {
 
-     public class ActivityGetYuanXiaoDataManager : SingletonBase<ActivityGetYuanXiaoDataManager>
 
-     {
 
-         public bool CheckOpen()
 
-         {
 
-             var activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfoOneByType(ActivityType.YuanXiao);
 
-             return activityInfo != null && activityInfo.StartTime <= TimeHelper.ServerNow() &&
 
-                    activityInfo.EndTime > TimeHelper.ServerNow();
 
-         }
 
-         public bool HaveNewLevelCanPlay()
 
-         {
 
-             int curLevel = GetCurLevel();
 
-             if(curLevel == gameinfoList.Count)
 
-             {
 
-                 return false;
 
-             }
 
-             long haveNum = ItemDataManager.GetItemNum(PickUpGameArray.Instance.dataArray[curLevel].comsumePassArr[0][0]);
 
-             bool canPlay = (haveNum >= PickUpGameArray.Instance.dataArray[curLevel].comsumePassArr[0][1]);
 
-             return canPlay;
 
-         }
 
-         public int GetCurLevel()
 
-         {
 
-             //return gameinfoList.Count;
 
-             int i;
 
-             for (i = 0; i < gameinfoList.Count; i++)
 
-             {
 
-                 if (!gameinfoList[i].IsCleared)
 
-                 {
 
-                     return i;
 
-                 }
 
-             }
 
-             return i;
 
-         }
 
-         public List<GameInfoProto> gameinfoList = new List<GameInfoProto>();
 
-     }
 
- }
 
 
  |