HeroBreakthroughFailPanel.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Fort23.Core;
  2. namespace Fort23.Mono
  3. {
  4. [UIBinding(prefab = "HeroBreakthroughFailPanel")]
  5. public partial class HeroBreakthroughFailPanel : UIPanel
  6. {
  7. private void Init()
  8. {
  9. }
  10. protected override void AddEvent()
  11. {
  12. }
  13. protected override void DelEvent()
  14. {
  15. }
  16. public override void AddButtonEvent()
  17. {
  18. Btn_Close.onClick.AddListener(() => { UIManager.Instance.HideUIUIPanel(this); });
  19. }
  20. public void CustomInit(int type, int xw)
  21. {
  22. if (type == 2)
  23. {
  24. Icon_Tu.gameObject.SetActive(true);
  25. Icon_Dj.gameObject.SetActive(false);
  26. }
  27. else if (type == 3)
  28. {
  29. Icon_Tu.gameObject.SetActive(false);
  30. Icon_Dj.gameObject.SetActive(true);
  31. }
  32. Text_Xw.text = "修为-" + xw;
  33. }
  34. public static async CTask<HeroBreakthroughFailPanel> OpenPanel(int type, int xw)
  35. {
  36. HeroBreakthroughFailPanel heroBreakthroughFailPanel = await UIManager.Instance.LoadAndOpenPanel<HeroBreakthroughFailPanel>(null, UILayer.Top);
  37. heroBreakthroughFailPanel.CustomInit(type, xw);
  38. return heroBreakthroughFailPanel;
  39. }
  40. }
  41. }