zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Unity/Assets/HotfixView/Model/FGUI/AutoCode/Bag/FUI_FrameUpgradeUI.cs

127 lines
3.2 KiB
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
using ET;
using FairyGUI;
using FairyGUI.Utils;
namespace ET
{
[ObjectSystem]
public class FUI_FrameUpgradeUI_AwakeSystem : AwakeSystem<FUI_FrameUpgradeUI, GObject>
{
public override void Awake(FUI_FrameUpgradeUI self, GObject go)
{
self.Awake(go);
}
}
public sealed class FUI_FrameUpgradeUI : FUI
{
public const string UIPackageName = "Bag";
public const string UIResName = "FrameUpgradeUI";
/// <summary>
/// {uiResName}的组件类型(GComponent、GButton、GProcessBar等)它们都是GObject的子类。
/// </summary>
public GLabel self;
public FUI_ButtonText_Blue m_closeButton;
public GGraph m_dragArea;
public GGraph m_contentArea;
public const string URL = "ui://71ktouo7il72kk";
private static GObject CreateGObject()
{
return UIPackage.CreateObject(UIPackageName, UIResName);
}
private static void CreateGObjectAsync(UIPackage.CreateObjectCallback result)
{
UIPackage.CreateObjectAsync(UIPackageName, UIResName, result);
}
public static FUI_FrameUpgradeUI CreateInstance(Entity domain)
{
return EntityFactory.Create<FUI_FrameUpgradeUI, GObject>(domain, CreateGObject());
}
public static ETTask<FUI_FrameUpgradeUI> CreateInstanceAsync(Entity domain)
{
ETTaskCompletionSource<FUI_FrameUpgradeUI> tcs = new ETTaskCompletionSource<FUI_FrameUpgradeUI>();
CreateGObjectAsync((go) =>
{
tcs.SetResult(EntityFactory.Create<FUI_FrameUpgradeUI, GObject>(domain, go));
});
return tcs.Task;
}
public static FUI_FrameUpgradeUI Create(Entity domain,GObject go)
{
return EntityFactory.Create<FUI_FrameUpgradeUI, GObject>(domain,go);
}
/// <summary>
/// 通过此方法获取的FUI在Dispose时不会释放GObject需要自行管理一般在配合FGUI的Pool机制时使用
/// </summary>
public static FUI_FrameUpgradeUI GetFormPool(Entity domain,GObject go)
{
2021-05-01 22:06:12 +08:00
var fui = go.Get<FUI_FrameUpgradeUI>();
2021-04-08 20:09:59 +08:00
if(fui == null)
{
fui = Create(domain,go);
}
fui.isFromFGUIPool = true;
return fui;
}
public void Awake(GObject go)
{
if(go == null)
{
return;
}
GObject = go;
if (string.IsNullOrWhiteSpace(Name))
{
Name = Id.ToString();
}
self = (GLabel)go;
self.Add(this);
2021-05-01 22:06:12 +08:00
var com = go.asCom;
2021-04-08 20:09:59 +08:00
if(com != null)
{
m_closeButton = FUI_ButtonText_Blue.Create(domain,com.GetChildAt(2));
m_dragArea = (GGraph)com.GetChildAt(3);
m_contentArea = (GGraph)com.GetChildAt(4);
}
}
public override void Dispose()
{
if(IsDisposed)
{
return;
}
base.Dispose();
self.Remove();
self = null;
m_closeButton = null;
m_dragArea = null;
m_contentArea = null;
}
}
}