From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/XDragonGuildBasicInfoDisplay.cs | 125 +++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XDragonGuildBasicInfoDisplay.cs (limited to 'Client/Assets/Scripts/XMainClient/XDragonGuildBasicInfoDisplay.cs') diff --git a/Client/Assets/Scripts/XMainClient/XDragonGuildBasicInfoDisplay.cs b/Client/Assets/Scripts/XMainClient/XDragonGuildBasicInfoDisplay.cs new file mode 100644 index 00000000..4c73724c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XDragonGuildBasicInfoDisplay.cs @@ -0,0 +1,125 @@ +using System; +using UILib; +using UnityEngine; + +namespace XMainClient +{ + internal class XDragonGuildBasicInfoDisplay + { + public Transform Root; + + public IXUILabel DragonGuildName; + + public IXUILabel LeaderName; + + public IXUILabel Level; + + public IXUILabel MemberCount; + + public IXUILabel PPT; + + public void Init(Transform go, bool bFirstInit) + { + this.Root = go; + Transform transform = this.Root.Find("GuildName"); + bool flag = transform != null; + if (flag) + { + this.DragonGuildName = (transform.GetComponent("XUILabel") as IXUILabel); + if (bFirstInit) + { + this.DragonGuildName.SetText(""); + } + } + else + { + this.DragonGuildName = null; + } + transform = this.Root.Find("LeaderName"); + bool flag2 = transform != null; + if (flag2) + { + this.LeaderName = (transform.GetComponent("XUILabel") as IXUILabel); + if (bFirstInit) + { + this.LeaderName.SetText(""); + } + } + else + { + this.LeaderName = 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("MemberCount"); + bool flag4 = transform != null; + if (flag4) + { + this.MemberCount = (transform.GetComponent("XUILabel") as IXUILabel); + if (bFirstInit) + { + this.MemberCount.SetText(""); + } + } + else + { + this.MemberCount = null; + } + transform = this.Root.Find("PPT"); + bool flag5 = transform != null; + if (flag5) + { + this.PPT = (transform.GetComponent("XUILabel") as IXUILabel); + if (bFirstInit) + { + this.PPT.SetText(""); + } + } + else + { + this.PPT = null; + } + } + + public void Set(XDragonGuildBaseData data) + { + bool flag = this.DragonGuildName != null; + if (flag) + { + this.DragonGuildName.SetText(data.dragonGuildName); + } + bool flag2 = this.LeaderName != null; + if (flag2) + { + this.LeaderName.SetText(data.leaderName); + } + bool flag3 = this.Level != null; + if (flag3) + { + this.Level.SetText("Lv." + data.level); + } + bool flag4 = this.PPT != null; + if (flag4) + { + this.PPT.SetText(data.totalPPT.ToString()); + } + bool flag5 = this.MemberCount != null; + if (flag5) + { + this.MemberCount.SetText(string.Format("{0}/{1}", data.memberCount, data.maxMemberCount)); + } + } + } +} -- cgit v1.1-26-g67d0