UI_BonusItem1.cs 2.2 KB

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