BlindBoxRuleView.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using FairyGUI;
  2. using UI.BlindBox;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using ET;
  6. namespace GFGGame
  7. {
  8. public class BlindBoxRuleView : BaseWindow
  9. {
  10. private UI_RuleTipsUI _ui;
  11. public override void Dispose()
  12. {
  13. if (_ui != null)
  14. {
  15. _ui.Dispose();
  16. _ui = null;
  17. }
  18. base.Dispose();
  19. }
  20. protected override void OnInit()
  21. {
  22. base.OnInit();
  23. packageName = UI_RuleTipsUI.PACKAGE_NAME;
  24. _ui = UI_RuleTipsUI.Create();
  25. this.viewCom = _ui.target;
  26. modal = true;
  27. this.viewCom.Center();
  28. viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
  29. }
  30. protected override void OnShown()
  31. {
  32. base.OnShown();
  33. int id = (int)this.viewData;
  34. string content = TextDescCfgArray.Instance.GetCfg(id).text;
  35. _ui.m_desc.text = content;
  36. }
  37. protected override void OnHide()
  38. {
  39. base.OnHide();
  40. }
  41. }
  42. }