MiniGameDateManager.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. using ET;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6. namespace GFGGame
  7. {
  8. class MiniGameDateManager : SingletonBase<MiniGameDateManager>
  9. {
  10. public List<ItemInfoProto> itemList = new List<ItemInfoProto>();
  11. public List<GameInfoProto> gameinfoList = new List<GameInfoProto>();
  12. //记录合成游戏的矩阵信息
  13. public List<int> idList_CS = new List<int>();
  14. public Dictionary<int, int> NewItemIdDic = new Dictionary<int, int>();
  15. public string ItemIdVPosition = "";
  16. public int MergeGameType = 1;
  17. public bool CurLevelStatus;
  18. public bool CHECK_TIPS = false; //提示弹窗是否打开
  19. //合成游戏
  20. public int taskID = 40001;
  21. public bool GetRewardRot()
  22. {
  23. if(gameinfoList.Count == 0)
  24. {
  25. return false;
  26. }
  27. foreach(GameInfoProto t in gameinfoList)
  28. {
  29. if(t.FirstPassRewardStatus == 1)
  30. {
  31. return true;
  32. }
  33. if(t.StarRewardStatus.Count > 0 )
  34. {
  35. for(int i = 0; i<t.StarRewardStatus.Count;i++)
  36. {
  37. if(t.StarRewardStatus[i] == 1)
  38. {
  39. return true;
  40. }
  41. }
  42. }
  43. }
  44. return false;
  45. }
  46. public List<List<int>> GetIdListToLL()
  47. {
  48. List<List<int>> idlist = new List<List<int>>();
  49. int itemNum = 5;
  50. for (int i = 0; i < itemNum; i++)
  51. {
  52. idlist.Add(new List<int>());
  53. for (int j = 0; j < itemNum; j++)
  54. {
  55. int index = i * itemNum + j;
  56. //对两个按钮单独处理
  57. if (i == itemNum - 1)
  58. {
  59. if (j == 0)
  60. {
  61. idlist[i].Add(-1);
  62. continue;
  63. }
  64. if (j == itemNum - 1)
  65. {
  66. idlist[i].Add(-1);
  67. continue;
  68. }
  69. }
  70. idlist[i].Add(idList_CS[index]);
  71. idlist[i][j] = idList_CS[index];
  72. }
  73. }
  74. return idlist;
  75. }
  76. public List<int> GetListByll(List<List<int>> idlist)
  77. {
  78. List<int> idList_S = new List<int>();
  79. int itemNum = 5;
  80. for (int i = 0; i < itemNum; i++)
  81. {
  82. for (int j = 0; j < itemNum; j++)
  83. {
  84. idList_S.Add(idlist[i][j]);
  85. //对两个按钮单独处理
  86. if (i == itemNum - 1)
  87. {
  88. if (j == 0)
  89. {
  90. continue;
  91. }
  92. if (j == itemNum - 1)
  93. {
  94. continue;
  95. }
  96. }
  97. }
  98. }
  99. return idList_S;
  100. }
  101. }
  102. }