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_CharacterUI_AwakeSystem : AwakeSystem<FUI_CharacterUI, GObject>
|
|
|
|
|
{
|
|
|
|
|
public override void Awake(FUI_CharacterUI self, GObject go)
|
|
|
|
|
{
|
|
|
|
|
self.Awake(go);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class FUI_CharacterUI : FUI
|
|
|
|
|
{
|
|
|
|
|
public const string UIPackageName = "Character";
|
|
|
|
|
public const string UIResName = "CharacterUI";
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// {uiResName}的组件类型(GComponent、GButton、GProcessBar等),它们都是GObject的子类。
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GComponent self;
|
|
|
|
|
|
|
|
|
|
public Controller m_addPoint;
|
|
|
|
|
public FUI_FrameCharacter m_frame;
|
|
|
|
|
public GLoader m_bg;
|
|
|
|
|
public GList m_atkEquipList;
|
|
|
|
|
public GList m_commonEquipList;
|
|
|
|
|
public GList m_infoList;
|
|
|
|
|
public GGroup m_infoGroup;
|
|
|
|
|
public GList m_battleAttributeList;
|
|
|
|
|
public GGroup m_battleGroup;
|
|
|
|
|
public GLoader m_icon;
|
|
|
|
|
public GList m_basicAttributeList;
|
|
|
|
|
public GGroup m_basicGroup;
|
|
|
|
|
public GList m_addPointAttributeList;
|
|
|
|
|
public FUI_ButtonText m_btnAddPoint;
|
|
|
|
|
public FUI_ButtonText m_btnResetPoint;
|
|
|
|
|
public GTextField m_txtPoint;
|
|
|
|
|
public FUI_ButtonPlus m_btnPlusTransLevel;
|
|
|
|
|
public FUI_ButtonMinus m_btnMinusTransLevel;
|
|
|
|
|
public GTextField m_txtTransLevel;
|
|
|
|
|
public GGroup m_addpointGroup;
|
|
|
|
|
public Transition m_Effect;
|
|
|
|
|
public const string URL = "ui://768jx61w7bww6";
|
|
|
|
|
|
|
|
|
|
private static GObject CreateGObject()
|
|
|
|
|
{
|
|
|
|
|
return UIPackage.CreateObject(UIPackageName, UIResName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void CreateGObjectAsync(UIPackage.CreateObjectCallback result)
|
|
|
|
|
{
|
|
|
|
|
UIPackage.CreateObjectAsync(UIPackageName, UIResName, result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static FUI_CharacterUI CreateInstance(Entity domain)
|
|
|
|
|
{
|
|
|
|
|
return EntityFactory.Create<FUI_CharacterUI, GObject>(domain, CreateGObject());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static ETTask<FUI_CharacterUI> CreateInstanceAsync(Entity domain)
|
|
|
|
|
{
|
|
|
|
|
ETTaskCompletionSource<FUI_CharacterUI> tcs = new ETTaskCompletionSource<FUI_CharacterUI>();
|
|
|
|
|
|
|
|
|
|
CreateGObjectAsync((go) =>
|
|
|
|
|
{
|
|
|
|
|
tcs.SetResult(EntityFactory.Create<FUI_CharacterUI, GObject>(domain, go));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return tcs.Task;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static FUI_CharacterUI Create(Entity domain,GObject go)
|
|
|
|
|
{
|
|
|
|
|
return EntityFactory.Create<FUI_CharacterUI, GObject>(domain,go);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 通过此方法获取的FUI,在Dispose时不会释放GObject,需要自行管理(一般在配合FGUI的Pool机制时使用)。
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static FUI_CharacterUI GetFormPool(Entity domain,GObject go)
|
|
|
|
|
{
|
2021-05-16 17:22:42 +08:00
|
|
|
|
var fui = go.Get<FUI_CharacterUI>();
|
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 = (GComponent)go;
|
|
|
|
|
|
|
|
|
|
self.Add(this);
|
|
|
|
|
|
2021-05-16 17:22:42 +08:00
|
|
|
|
var com = go.asCom;
|
2021-04-08 20:09:59 +08:00
|
|
|
|
|
|
|
|
|
if(com != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
m_addPoint = com.GetControllerAt(0);
|
|
|
|
|
m_frame = FUI_FrameCharacter.Create(domain,com.GetChildAt(0));
|
|
|
|
|
m_bg = (GLoader)com.GetChildAt(1);
|
|
|
|
|
m_atkEquipList = (GList)com.GetChildAt(3);
|
|
|
|
|
m_commonEquipList = (GList)com.GetChildAt(4);
|
|
|
|
|
m_infoList = (GList)com.GetChildAt(7);
|
|
|
|
|
m_infoGroup = (GGroup)com.GetChildAt(8);
|
|
|
|
|
m_battleAttributeList = (GList)com.GetChildAt(11);
|
|
|
|
|
m_battleGroup = (GGroup)com.GetChildAt(12);
|
|
|
|
|
m_icon = (GLoader)com.GetChildAt(13);
|
|
|
|
|
m_basicAttributeList = (GList)com.GetChildAt(16);
|
|
|
|
|
m_basicGroup = (GGroup)com.GetChildAt(17);
|
|
|
|
|
m_addPointAttributeList = (GList)com.GetChildAt(20);
|
|
|
|
|
m_btnAddPoint = FUI_ButtonText.Create(domain,com.GetChildAt(21));
|
|
|
|
|
m_btnResetPoint = FUI_ButtonText.Create(domain,com.GetChildAt(22));
|
|
|
|
|
m_txtPoint = (GTextField)com.GetChildAt(23);
|
|
|
|
|
m_btnPlusTransLevel = FUI_ButtonPlus.Create(domain,com.GetChildAt(26));
|
|
|
|
|
m_btnMinusTransLevel = FUI_ButtonMinus.Create(domain,com.GetChildAt(27));
|
|
|
|
|
m_txtTransLevel = (GTextField)com.GetChildAt(28);
|
|
|
|
|
m_addpointGroup = (GGroup)com.GetChildAt(29);
|
|
|
|
|
m_Effect = com.GetTransitionAt(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public override void Dispose()
|
|
|
|
|
{
|
|
|
|
|
if(IsDisposed)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
base.Dispose();
|
|
|
|
|
|
|
|
|
|
self.Remove();
|
|
|
|
|
self = null;
|
|
|
|
|
|
|
|
|
|
m_addPoint = null;
|
|
|
|
|
m_frame.Dispose();
|
|
|
|
|
m_frame = null;
|
|
|
|
|
m_bg = null;
|
|
|
|
|
m_atkEquipList = null;
|
|
|
|
|
m_commonEquipList = null;
|
|
|
|
|
m_infoList = null;
|
|
|
|
|
m_infoGroup = null;
|
|
|
|
|
m_battleAttributeList = null;
|
|
|
|
|
m_battleGroup = null;
|
|
|
|
|
m_icon = null;
|
|
|
|
|
m_basicAttributeList = null;
|
|
|
|
|
m_basicGroup = null;
|
|
|
|
|
m_addPointAttributeList = null;
|
|
|
|
|
m_btnAddPoint = null;
|
|
|
|
|
m_btnResetPoint = null;
|
|
|
|
|
m_txtPoint = null;
|
|
|
|
|
m_btnPlusTransLevel = null;
|
|
|
|
|
m_btnMinusTransLevel = null;
|
|
|
|
|
m_txtTransLevel = null;
|
|
|
|
|
m_addpointGroup = null;
|
|
|
|
|
m_Effect = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|