summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XDragonGuildBasicInfoDisplay.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XDragonGuildBasicInfoDisplay.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XDragonGuildBasicInfoDisplay.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/XDragonGuildBasicInfoDisplay.cs125
1 files changed, 125 insertions, 0 deletions
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));
+ }
+ }
+ }
+}