ActivityFYJYDataManager.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using ET;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. namespace GFGGame
  6. {
  7. public class ActivityFYJYDataManager:SingletonBase<ActivityFYJYDataManager>
  8. {
  9. public List<GameInfoProto> gameinfoList = new List<GameInfoProto>();
  10. public bool CheckOpen()
  11. {
  12. return (ActivityDataManager.Instance.GetCurOpenActiveByType(ActivityType.AfternoonLeisure) > 0);
  13. }
  14. public bool CheckRed()
  15. {
  16. if (ActivityDataManager.Instance.GetCurOpenActiveByType(ActivityType.AfternoonLeisure) == 0)
  17. {
  18. return false;
  19. }
  20. RoleLimitData limitData;
  21. limitData = RoleLimitDataManager.GetLimitData(300);
  22. int times = limitData.TotalPlayMax - limitData.PlayTimes;
  23. if (times > 0)
  24. {
  25. //当有关卡没通过时
  26. for (int i = 0; i < gameinfoList.Count; i++)
  27. {
  28. if (gameinfoList[i].GameType == 3)
  29. {
  30. if (!gameinfoList[i].IsCleared)
  31. {
  32. return true;
  33. }
  34. }
  35. }
  36. return false;
  37. }
  38. else
  39. {
  40. return false;
  41. }
  42. }
  43. }
  44. }