HeroBreakthroughFailPanel.cs 1.3 KB

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