ModalStatusView.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using FairyGUI;
  2. using UI.Common;
  3. using UnityEngine;
  4. namespace GFGGame
  5. {
  6. public class ModalStatusView : BaseView
  7. {
  8. private UI_ModalStatusUI _ui;
  9. private GameObject _gameObject0;
  10. private GoWrapper _wrapper0;
  11. protected override void OnInit()
  12. {
  13. base.OnInit();
  14. _ui = UI_ModalStatusUI.Create();
  15. viewCom = _ui.target;
  16. layer = ConstViewLayer.MODAL;
  17. isfullScreen = true;
  18. }
  19. protected override void OnShown()
  20. {
  21. base.OnShown();
  22. string message = "请稍后...";
  23. if (viewData != null)
  24. {
  25. message = (string)viewData;
  26. }
  27. _ui.m_txtMessage.text = message;
  28. string resPath0 = ResPathUtil.GetViewEffectPath("ui_cxlj", "ui_cxlj_gq");
  29. SceneController.AddObjectToView(null, null, _ui.m_holder, resPath0, out _gameObject0, out _wrapper0);
  30. }
  31. protected override void OnHide()
  32. {
  33. base.OnHide();
  34. }
  35. public override void Dispose()
  36. {
  37. SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
  38. if (_ui != null)
  39. {
  40. _ui.Dispose();
  41. _ui = null;
  42. }
  43. base.Dispose();
  44. }
  45. }
  46. }