LuckyBoxBonusDataCache.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // using System.Collections.Generic;
  2. // using UnityEngine;
  3. // using System;
  4. // namespace GFGGame
  5. // {
  6. // public class LuckyBoxBonusDataCache
  7. // {
  8. // private static int _currentBoxId;
  9. // private static int _currentSelectId;
  10. // public static int currentBoxId
  11. // {
  12. // get
  13. // {
  14. // return _currentBoxId;
  15. // }
  16. // set
  17. // {
  18. // if (_currentBoxId != value)
  19. // {
  20. // _currentBoxId = value;
  21. // InitData(_currentBoxId);
  22. // }
  23. // }
  24. // }
  25. // public static string probShow;
  26. // private static List<LuckyBoxBonusData> _showList;
  27. // public static int GetOwnedCount()
  28. // {
  29. // int count = 0;
  30. // foreach (LuckyBoxBonusData luckyBoxBonusData in _showList)
  31. // {
  32. // foreach (ItemData itemData in luckyBoxBonusData.itemList)
  33. // {
  34. // if (ItemDataManager.GetItemNum(itemData.id) > 0)
  35. // {
  36. // count++;
  37. // }
  38. // }
  39. // }
  40. // return count;
  41. // }
  42. // public static List<LuckyBoxBonusData> GetCurrentShowList()
  43. // {
  44. // return _showList.GetRange(0, _showList.Count);
  45. // }
  46. // private static void InitData(int boxId)
  47. // {
  48. // LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(boxId);
  49. // probShow = luckyBoxCfg.probShow;
  50. // _showList = GetBonusDataList(luckyBoxCfg.bonusShowArr);
  51. // }
  52. // private static List<LuckyBoxBonusData> GetBonusDataList(int[] idsList)
  53. // {
  54. // List<LuckyBoxBonusData> list = new List<LuckyBoxBonusData>();
  55. // foreach (int id in idsList)
  56. // {
  57. // BonusListCfg bonusListCfg = BonusListCfgArray.Instance.GetCfg(id);
  58. // LuckyBoxBonusData luckyBoxBonusData = new LuckyBoxBonusData();
  59. // luckyBoxBonusData.id = id;
  60. // luckyBoxBonusData.name = bonusListCfg.name;
  61. // luckyBoxBonusData.itemList = ItemUtil.CreateItemDataList(bonusListCfg.bonusListArr);
  62. // list.Add(luckyBoxBonusData);
  63. // }
  64. // return list;
  65. // }
  66. // }
  67. // }