diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs b/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs new file mode 100644 index 00000000..e4f9b5df --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs @@ -0,0 +1,54 @@ +using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class HeroBattleTeam
+ {
+ public uint Score
+ {
+ set
+ {
+ bool flag = this._score != value;
+ if (flag)
+ {
+ this._score = value;
+ this.m_Score.SetText(string.Format("{0}%", this._score));
+ }
+ }
+ }
+
+ public GameObject m_OccupantCircle;
+
+ public IXUIProgress m_Ring;
+
+ public IXUILabel m_Score;
+
+ private uint _score = 0u;
+
+ public HeroBattleTeam(Transform ts)
+ {
+ this.m_Ring = (ts.Find("Ring").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_Ring.value = 0f;
+ this.m_Score = (ts.Find("Score").GetComponent("XUILabel") as IXUILabel);
+ this.m_Score.SetText("0%");
+ this.m_OccupantCircle = ts.Find("Circle").gameObject;
+ this.m_OccupantCircle.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+
+ public void SetOccupyValue(float value)
+ {
+ this.m_Ring.value = value;
+ }
+
+ public void SetOccupantState(bool state)
+ {
+ this.m_OccupantCircle.transform.localPosition = (state ? Vector3.zero : XGameUI.Far_Far_Away);
+ if (state)
+ {
+ this.SetOccupyValue(0f);
+ }
+ }
+ }
+}
|