XiuFangView.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using System.Collections;
  2. using UnityEngine;
  3. using UI.XiuFang;
  4. using FairyGUI;
  5. namespace GFGGame
  6. {
  7. public class XiuFangView : BaseWindow
  8. {
  9. private UI_XiuFangUI _ui;
  10. public override void Dispose()
  11. {
  12. base.Dispose();
  13. }
  14. protected override void OnInit()
  15. {
  16. base.OnInit();
  17. packageName = UI_XiuFangUI.PACKAGE_NAME;
  18. _ui = UI_XiuFangUI.Create();
  19. this.viewCom = _ui.target;
  20. isfullScreen = true;
  21. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  22. _ui.m_btnClothingShop.onClick.Add(OnClickBtnClothingShop);
  23. _ui.m_btnSuitSynthetic.onClick.Add(OnClickBtnSuitSynthetic);
  24. _ui.m_btnClothingUpgrade.onClick.Add(OnClickBtnClothingUpgrade);
  25. }
  26. protected override void OnShown()
  27. {
  28. base.OnShown();
  29. GuideController.TryGuideSuitSyntheticView(_ui.m_btnSuitSynthetic);
  30. }
  31. protected override void OnHide()
  32. {
  33. base.OnHide();
  34. }
  35. private void OnClickBtnBack()
  36. {
  37. this.Hide();
  38. ViewManager.GoBackFrom(ViewName.XIU_FANG_VIEW);
  39. }
  40. private void OnClickBtnClothingShop()
  41. {
  42. ViewManager.Show(ViewName.CLOTHING_SHOP_VIEW, null, null, false, true);
  43. }
  44. private void OnClickBtnSuitSynthetic()
  45. {
  46. ViewManager.Show(ViewName.SUIT_SYNTHETIC_LIST_VIEW, null, new object[] { ViewName.XIU_FANG_VIEW, this.viewData });
  47. }
  48. private void OnClickBtnClothingUpgrade()
  49. {
  50. PromptController.Instance.ShowFloatTextPrompt("暂未开放", MessageType.WARNING);
  51. }
  52. }
  53. }