BonusController.cs 772 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. namespace GFGGame
  4. {
  5. public class BonusController
  6. {
  7. public static void TryShowBonusList(int[][] bonusInfos, Action onSuccess = null)
  8. {
  9. if (bonusInfos != null && bonusInfos.Length > 0)
  10. {
  11. List<ItemData> bonusList = ItemUtil.CreateItemDataList(bonusInfos);
  12. ViewManager.Show<RewardView>(new object[] { bonusList, onSuccess });
  13. }
  14. }
  15. public static void TryShowBonusList(List<ItemData> bonusList, Action onSuccess = null)
  16. {
  17. if (bonusList != null && bonusList.Count > 0)
  18. {
  19. ViewManager.Show<RewardView>(new object[] { bonusList, onSuccess });
  20. }
  21. }
  22. }
  23. }