/** 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_NPCTaskUI_AwakeSystem : AwakeSystem { public override void Awake(FUI_NPCTaskUI self, GObject go) { self.Awake(go); } } public sealed class FUI_NPCTaskUI : FUI { public const string UIPackageName = "Task"; public const string UIResName = "NPCTaskUI"; /// /// {uiResName}的组件类型(GComponent、GButton、GProcessBar等),它们都是GObject的子类。 /// public GComponent self; public Controller m_contrl; public FUI_FrameNPCTaskUI m_frame; public GTextField m_txtDialog; public GList m_taskList; public GGroup m_first; public GTextField m_txtTaskName; public GTextField m_txtContent; public GTextField m_txtTarget; public GTextField m_txtTargetUnitOrPos; public GTextField m_txtRewardCount; public GList m_RewardList; public FUI_ButtonText m_btnAccept; public FUI_ButtonText m_btnBack; public GGroup m_second; public const string URL = "ui://thcq7hm4y69ub"; private static GObject CreateGObject() { return UIPackage.CreateObject(UIPackageName, UIResName); } private static void CreateGObjectAsync(UIPackage.CreateObjectCallback result) { UIPackage.CreateObjectAsync(UIPackageName, UIResName, result); } public static FUI_NPCTaskUI 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_NPCTaskUI Create(Entity domain,GObject go) { return EntityFactory.Create(domain,go); } /// /// 通过此方法获取的FUI,在Dispose时不会释放GObject,需要自行管理(一般在配合FGUI的Pool机制时使用)。 /// public static FUI_NPCTaskUI GetFormPool(Entity domain,GObject go) { FUI_NPCTaskUI 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 = (GComponent)go; self.Add(this); GComponent com = go.asCom; if(com != null) { m_contrl = com.GetControllerAt(0); m_frame = FUI_FrameNPCTaskUI.Create(domain,com.GetChildAt(0)); m_txtDialog = (GTextField)com.GetChildAt(1); m_taskList = (GList)com.GetChildAt(2); m_first = (GGroup)com.GetChildAt(3); m_txtTaskName = (GTextField)com.GetChildAt(4); m_txtContent = (GTextField)com.GetChildAt(5); m_txtTarget = (GTextField)com.GetChildAt(7); m_txtTargetUnitOrPos = (GTextField)com.GetChildAt(9); m_txtRewardCount = (GTextField)com.GetChildAt(11); m_RewardList = (GList)com.GetChildAt(12); m_btnAccept = FUI_ButtonText.Create(domain,com.GetChildAt(13)); m_btnBack = FUI_ButtonText.Create(domain,com.GetChildAt(14)); m_second = (GGroup)com.GetChildAt(15); } } public override void Dispose() { if(IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; m_contrl = null; m_frame.Dispose(); m_frame = null; m_txtDialog = null; m_taskList = null; m_first = null; m_txtTaskName = null; m_txtContent = null; m_txtTarget = null; m_txtTargetUnitOrPos = null; m_txtRewardCount = null; m_RewardList = null; m_btnAccept = null; m_btnBack = null; m_second = null; } } }