BuyConfirmController.cs 701 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. namespace GFGGame
  3. {
  4. public class BuyConfirmController : SingletonBase<BuyConfirmController>
  5. {
  6. private static BuyConfirmView _buyConfirmView;
  7. public static void Show(int itemId, int count, Action onSuccess = null, string message = "")
  8. {
  9. if (_buyConfirmView == null)
  10. {
  11. _buyConfirmView = new BuyConfirmView();
  12. }
  13. _buyConfirmView.SetParams(itemId, count, onSuccess, message);
  14. _buyConfirmView.Show();
  15. }
  16. public static void hide()
  17. {
  18. if (_buyConfirmView != null)
  19. {
  20. _buyConfirmView.Hide();
  21. }
  22. }
  23. }
  24. }