From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/MallSystemBehaviour.cs | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/MallSystemBehaviour.cs (limited to 'Client/Assets/Scripts/XMainClient/MallSystemBehaviour.cs') diff --git a/Client/Assets/Scripts/XMainClient/MallSystemBehaviour.cs b/Client/Assets/Scripts/XMainClient/MallSystemBehaviour.cs new file mode 100644 index 00000000..cb111f43 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/MallSystemBehaviour.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using UILib; +using XMainClient.UI.UICommon; + +namespace XMainClient +{ + internal class MallSystemBehaviour : DlgBehaviourBase + { + public static readonly int MAX_MONEY_NUM = 3; + + public IXUIButton m_Close; + + public IXUIButton m_Help; + + public IXUILabel m_ShopName; + + public List m_MoneyBoard = new List(); + + public List m_MoneyTween = new List(); + + public List m_MoneyNum = new List(); + + public List m_MoneyIcon = new List(); + + public List m_MoneyBack = new List(); + + public List m_MoneyType = new List(); + + private void Awake() + { + this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton); + this.m_Help = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton); + this.m_ShopName = (base.transform.Find("Bg/ShopName").GetComponent("XUILabel") as IXUILabel); + for (int i = 0; i < MallSystemBehaviour.MAX_MONEY_NUM; i++) + { + this.m_MoneyType.Add(0); + IXUISprite item = base.transform.Find("Bg/NormalShopFrame/MoneyBoard/Money" + (i + 1).ToString() + "/board").GetComponent("XUISprite") as IXUISprite; + IXUILabel ixuilabel = base.transform.Find("Bg/NormalShopFrame/MoneyBoard/Money" + (i + 1).ToString()).GetComponent("XUILabel") as IXUILabel; + IXUISprite item2 = base.transform.Find("Bg/NormalShopFrame/MoneyBoard/Money" + (i + 1).ToString() + "/icon").GetComponent("XUISprite") as IXUISprite; + IXUILabel item3 = base.transform.Find("Bg/NormalShopFrame/MoneyBoard/Money" + (i + 1).ToString() + "/value").GetComponent("XUILabel") as IXUILabel; + XNumberTween item4 = XNumberTween.Create(ixuilabel.gameObject.transform); + this.m_MoneyNum.Add(item3); + this.m_MoneyIcon.Add(item2); + this.m_MoneyBoard.Add(ixuilabel); + this.m_MoneyBack.Add(item); + this.m_MoneyTween.Add(item4); + } + } + } +} -- cgit v1.1-26-g67d0