HeroBreakthroughFailPanel.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. }
  19. public void CustomInit(int type, int xw)
  20. {
  21. if (type == 2)
  22. {
  23. Icon_Tu.gameObject.SetActive(true);
  24. Icon_Dj.gameObject.SetActive(false);
  25. }
  26. else if (type == 3)
  27. {
  28. Icon_Tu.gameObject.SetActive(false);
  29. Icon_Dj.gameObject.SetActive(true);
  30. }
  31. Text_Xw.text = "修为-" + xw;
  32. }
  33. public static async CTask<HeroBreakthroughFailPanel> OpenPanel(int type, int xw)
  34. {
  35. HeroBreakthroughFailPanel heroBreakthroughFailPanel = await UIManager.Instance.LoadAndOpenPanel<HeroBreakthroughFailPanel>(null, UILayer.Top);
  36. heroBreakthroughFailPanel.CustomInit(type,xw);
  37. return heroBreakthroughFailPanel;
  38. }
  39. }
  40. }