UI_Component2.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /** This is an automatically generated class by FairyGUI. Please do not modify it. **/
  2. using FairyGUI;
  3. namespace UI.Guide
  4. {
  5. public partial class UI_Component2
  6. {
  7. public GComponent target;
  8. public GGraph m_mask;
  9. public GGraph m_guideArea;
  10. public const string URL = "ui://vxxz0ya7tu96e";
  11. public const string PACKAGE_NAME = "Guide";
  12. public const string RES_NAME = "Component2";
  13. private static UI_Component2 _proxy;
  14. public static UI_Component2 Create(GObject gObject = null)
  15. {
  16. var ui = new UI_Component2();
  17. if(gObject == null)
  18. ui.target = (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
  19. else
  20. ui.target = (GComponent)gObject;
  21. ui.Init(ui.target);
  22. return ui;
  23. }
  24. public static UI_Component2 Proxy(GObject gObject = null)
  25. {
  26. if(_proxy == null)
  27. {
  28. _proxy = new UI_Component2();
  29. }
  30. var ui = _proxy;
  31. if(gObject == null)
  32. ui.target = (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
  33. else
  34. ui.target = (GComponent)gObject;
  35. ui.Init(ui.target);
  36. return ui;
  37. }
  38. public static void ProxyEnd()
  39. {
  40. if (_proxy != null)
  41. {
  42. _proxy.Dispose();
  43. }
  44. }
  45. public static void ClearProxy()
  46. {
  47. ProxyEnd();
  48. _proxy = null;
  49. }
  50. private void Init(GComponent comp)
  51. {
  52. m_mask = (GGraph)comp.GetChild("mask");
  53. m_guideArea = (GGraph)comp.GetChild("guideArea");
  54. }
  55. public void Dispose(bool disposeTarget = false)
  56. {
  57. m_mask = null;
  58. m_guideArea = null;
  59. if(disposeTarget && target != null)
  60. {
  61. target.RemoveFromParent();
  62. target.Dispose();
  63. }
  64. target = null;
  65. }
  66. }
  67. }