CTT/Unity/Assets/HotfixView/Model/FGUI/AutoCode/Pet/FUI_PetUI.cs

143 lines
3.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/** 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_PetUI_AwakeSystem : AwakeSystem<FUI_PetUI, GObject>
{
public override void Awake(FUI_PetUI self, GObject go)
{
self.Awake(go);
}
}
public sealed class FUI_PetUI : FUI
{
public const string UIPackageName = "Pet";
public const string UIResName = "PetUI";
/// <summary>
/// {uiResName}的组件类型(GComponent、GButton、GProcessBar等)它们都是GObject的子类。
/// </summary>
public GComponent self;
public FUI_FramePetUI m_frame;
public GList m_listBtn;
public GTextField m_txtStute;
public GTextField m_txtDialog;
public GLoader m_icon;
public GButton m_labTime;
public GButton m_btnEnd;
public GTextField m_txtAdd;
public const string URL = "ui://902q6y8xbtytc";
private static GObject CreateGObject()
{
return UIPackage.CreateObject(UIPackageName, UIResName);
}
private static void CreateGObjectAsync(UIPackage.CreateObjectCallback result)
{
UIPackage.CreateObjectAsync(UIPackageName, UIResName, result);
}
public static FUI_PetUI CreateInstance(Entity domain)
{
return EntityFactory.Create<FUI_PetUI, GObject>(domain, CreateGObject());
}
public static ETTask<FUI_PetUI> CreateInstanceAsync(Entity domain)
{
ETTaskCompletionSource<FUI_PetUI> tcs = new ETTaskCompletionSource<FUI_PetUI>();
CreateGObjectAsync((go) =>
{
tcs.SetResult(EntityFactory.Create<FUI_PetUI, GObject>(domain, go));
});
return tcs.Task;
}
public static FUI_PetUI Create(Entity domain,GObject go)
{
return EntityFactory.Create<FUI_PetUI, GObject>(domain,go);
}
/// <summary>
/// 通过此方法获取的FUI在Dispose时不会释放GObject需要自行管理一般在配合FGUI的Pool机制时使用
/// </summary>
public static FUI_PetUI GetFormPool(Entity domain,GObject go)
{
var fui = go.Get<FUI_PetUI>();
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 = (GComponent)go;
self.Add(this);
var com = go.asCom;
if(com != null)
{
m_frame = FUI_FramePetUI.Create(domain,com.GetChildAt(0));
m_listBtn = (GList)com.GetChildAt(1);
m_txtStute = (GTextField)com.GetChildAt(2);
m_txtDialog = (GTextField)com.GetChildAt(3);
m_icon = (GLoader)com.GetChildAt(4);
m_labTime = (GButton)com.GetChildAt(5);
m_btnEnd = (GButton)com.GetChildAt(6);
m_txtAdd = (GTextField)com.GetChildAt(7);
}
}
public override void Dispose()
{
if(IsDisposed)
{
return;
}
base.Dispose();
self.Remove();
self = null;
m_frame.Dispose();
m_frame = null;
m_listBtn = null;
m_txtStute = null;
m_txtDialog = null;
m_icon = null;
m_labTime = null;
m_btnEnd = null;
m_txtAdd = null;
}
}
}