/** 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_FrameSpaceTravelNPCUI_AwakeSystem : AwakeSystem { public override void Awake(FUI_FrameSpaceTravelNPCUI self, GObject go) { self.Awake(go); } } public sealed class FUI_FrameSpaceTravelNPCUI : FUI { public const string UIPackageName = "TransPointUI"; public const string UIResName = "FrameSpaceTravelNPCUI"; /// /// {uiResName}的组件类型(GComponent、GButton、GProcessBar等),它们都是GObject的子类。 /// public GLabel self; public FUI_ButtonClose_Blue m_closeButton; public GGraph m_dragArea; public GGraph m_contentArea; public const string URL = "ui://7kiucqowm9qq2z"; private static GObject CreateGObject() { return UIPackage.CreateObject(UIPackageName, UIResName); } private static void CreateGObjectAsync(UIPackage.CreateObjectCallback result) { UIPackage.CreateObjectAsync(UIPackageName, UIResName, result); } public static FUI_FrameSpaceTravelNPCUI CreateInstance(Entity domain) { return EntityFactory.Create(domain, CreateGObject()); } public static ETTask CreateInstanceAsync(Entity domain) { ETTaskCompletionSource tcs = new ETTaskCompletionSource(); CreateGObjectAsync((go) => { tcs.SetResult(EntityFactory.Create(domain, go)); }); return tcs.Task; } public static FUI_FrameSpaceTravelNPCUI Create(Entity domain,GObject go) { return EntityFactory.Create(domain,go); } /// /// 通过此方法获取的FUI,在Dispose时不会释放GObject,需要自行管理(一般在配合FGUI的Pool机制时使用)。 /// public static FUI_FrameSpaceTravelNPCUI GetFormPool(Entity domain,GObject go) { var fui = go.Get(); 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); var com = go.asCom; if(com != null) { m_closeButton = FUI_ButtonClose_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; } } }