UI_BtnBuy.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /** This is an automatically generated class by FairyGUI. Please do not modify it. **/
  2. using FairyGUI;
  3. namespace UI.EnduringGiftBox
  4. {
  5. public partial class UI_BtnBuy
  6. {
  7. public GButton target;
  8. public GImage m_bagGrey;
  9. public GImage m_bagYellow;
  10. public GTextField m_txtNewPrice;
  11. public GTextField m_txtOldPrice;
  12. public GLoader m_loaIcon;
  13. public const string URL = "ui://bdi1qe15qqhzy";
  14. public const string PACKAGE_NAME = "EnduringGiftBox";
  15. public const string RES_NAME = "BtnBuy";
  16. private static UI_BtnBuy _proxy;
  17. public static UI_BtnBuy Create(GObject gObject = null)
  18. {
  19. var ui = new UI_BtnBuy();
  20. if(gObject == null)
  21. ui.target = (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
  22. else
  23. ui.target = (GButton)gObject;
  24. ui.Init(ui.target);
  25. return ui;
  26. }
  27. public static UI_BtnBuy Proxy(GObject gObject = null)
  28. {
  29. if(_proxy == null)
  30. {
  31. _proxy = new UI_BtnBuy();
  32. }
  33. var ui = _proxy;
  34. if(gObject == null)
  35. ui.target = (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
  36. else
  37. ui.target = (GButton)gObject;
  38. ui.Init(ui.target);
  39. return ui;
  40. }
  41. public static void ProxyEnd()
  42. {
  43. if (_proxy != null)
  44. {
  45. _proxy.Dispose();
  46. }
  47. }
  48. public static void ClearProxy()
  49. {
  50. ProxyEnd();
  51. _proxy = null;
  52. }
  53. private void Init(GComponent comp)
  54. {
  55. m_bagGrey = (GImage)comp.GetChild("bagGrey");
  56. m_bagYellow = (GImage)comp.GetChild("bagYellow");
  57. m_txtNewPrice = (GTextField)comp.GetChild("txtNewPrice");
  58. m_txtOldPrice = (GTextField)comp.GetChild("txtOldPrice");
  59. m_loaIcon = (GLoader)comp.GetChild("loaIcon");
  60. }
  61. public void Dispose(bool disposeTarget = false)
  62. {
  63. m_bagGrey = null;
  64. m_bagYellow = null;
  65. m_txtNewPrice = null;
  66. m_txtOldPrice = null;
  67. m_loaIcon = null;
  68. if(disposeTarget && target != null)
  69. {
  70. target.RemoveFromParent();
  71. target.Dispose();
  72. }
  73. target = null;
  74. }
  75. }
  76. }