diff options
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XDragonGuildMemberInfoDisplay.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/XDragonGuildMemberInfoDisplay.cs | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/XDragonGuildMemberInfoDisplay.cs b/Client/Assets/Scripts/XMainClient/XDragonGuildMemberInfoDisplay.cs new file mode 100644 index 00000000..61a40a8c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XDragonGuildMemberInfoDisplay.cs @@ -0,0 +1,176 @@ +using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class XDragonGuildMemberInfoDisplay
+ {
+ public Transform Root;
+
+ public IXUILabelSymbol Name;
+
+ public IXUILabel Level;
+
+ public IXUILabel Position;
+
+ public IXUILabel PPT;
+
+ public IXUISprite Portrait;
+
+ public IXUISprite Profession;
+
+ public IXUILabel Liveness;
+
+ public IXUISpriteAnimation Title;
+
+ public void Init(Transform go, bool bFirstInit)
+ {
+ this.Root = go;
+ Transform transform = this.Root.Find("Name");
+ bool flag = transform != null;
+ if (flag)
+ {
+ this.Name = (transform.GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ if (bFirstInit)
+ {
+ this.Name.InputText = "";
+ }
+ }
+ else
+ {
+ this.Name = null;
+ }
+ transform = this.Root.Find("Position");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ this.Position = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.Position.SetText("");
+ }
+ }
+ else
+ {
+ this.Position = null;
+ }
+ transform = this.Root.Find("Level");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ this.Level = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.Level.SetText("");
+ }
+ }
+ else
+ {
+ this.Level = null;
+ }
+ transform = this.Root.Find("PPT");
+ bool flag4 = transform != null;
+ if (flag4)
+ {
+ this.PPT = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.PPT.SetText("");
+ }
+ }
+ else
+ {
+ this.PPT = null;
+ }
+ transform = this.Root.Find("Portrait");
+ bool flag5 = transform != null;
+ if (flag5)
+ {
+ this.Portrait = (transform.GetComponent("XUISprite") as IXUISprite);
+ }
+ else
+ {
+ this.Portrait = null;
+ }
+ transform = this.Root.Find("Profession");
+ bool flag6 = transform != null;
+ if (flag6)
+ {
+ this.Profession = (transform.GetComponent("XUISprite") as IXUISprite);
+ }
+ else
+ {
+ this.Profession = null;
+ }
+ transform = this.Root.Find("Liveness");
+ bool flag7 = transform != null;
+ if (flag7)
+ {
+ this.Liveness = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.Liveness.SetText(string.Empty);
+ }
+ }
+ transform = this.Root.Find("Title");
+ bool flag8 = transform != null;
+ if (flag8)
+ {
+ this.Title = (transform.GetComponent("XUISpriteAnimation") as IXUISpriteAnimation);
+ }
+ }
+
+ public void Set(XDragonGuildMember data)
+ {
+ bool flag = this.Name != null;
+ if (flag)
+ {
+ this.Name.InputText = data.name + XWelfareDocument.GetMemberPrivilegeIconString(data.paymemberid) + XRechargeDocument.GetVIPIconString(data.vip);
+ }
+ bool flag2 = this.Position != null;
+ if (flag2)
+ {
+ this.Position.SetText(XDragonGuildDocument.DragonGuildPP.GetPositionName(data.position, false));
+ }
+ bool flag3 = this.Level != null;
+ if (flag3)
+ {
+ this.Level.SetText("Lv." + data.level);
+ }
+ bool flag4 = this.PPT != null;
+ if (flag4)
+ {
+ this.PPT.SetText(data.ppt.ToString());
+ }
+ bool flag5 = this.Portrait != null;
+ if (flag5)
+ {
+ this.Portrait.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2(data.profession));
+ }
+ bool flag6 = this.Profession != null;
+ if (flag6)
+ {
+ this.Profession.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(data.profession));
+ }
+ bool flag7 = this.Liveness != null;
+ if (flag7)
+ {
+ this.Liveness.SetText(data.GetLiveness());
+ }
+ bool flag8 = this.Title != null;
+ if (flag8)
+ {
+ TitleTable.RowData title = XTitleDocument.GetTitle(data.titleID);
+ bool flag9 = title != null;
+ if (flag9)
+ {
+ this.Title.SetNamePrefix(title.RankAtlas, title.RankIcon);
+ this.Title.SetFrameRate(XTitleDocument.TITLE_FRAME_RATE);
+ this.Title.MakePixelPerfect();
+ }
+ }
+ }
+ }
+}
|