1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 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 activityID = ActivityDataManager.Instance.GetCurOpenActiveByType(ActivityType.YuanXiao);
- return activityID > 0;
- }
- 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()
- {
- int i;
- for (i = 0; i < gameinfoList.Count; i++)
- {
- if (!gameinfoList[i].IsCleared)
- {
- return i;
- }
- }
- return i;
- }
- public List<GameInfoProto> gameinfoList = new List<GameInfoProto>();
- }
- }
|