BonusController.cs 840 B

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