XiuFangView.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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, new object[] { ViewName.XIU_FANG_VIEW, this.viewData }, false, true);
  43. this.Hide();
  44. }
  45. private void OnClickBtnSuitSynthetic()
  46. {
  47. ViewManager.Show(ViewName.SUIT_SYNTHETIC_LIST_VIEW, null, new object[] { ViewName.XIU_FANG_VIEW, this.viewData });
  48. }
  49. private void OnClickBtnClothingUpgrade()
  50. {
  51. PromptController.Instance.ShowFloatTextPrompt("暂未开放", MessageType.WARNING);
  52. }
  53. }
  54. }