From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/UI/PandoraBehaviour.cs | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs (limited to 'Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs') diff --git a/Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs new file mode 100644 index 00000000..5d32e8fd --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs @@ -0,0 +1,55 @@ +using System; +using UILib; +using UnityEngine; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient.UI +{ + internal class PandoraBehaviour : DlgBehaviourBase + { + public Transform m_DisplayFrame; + + public Transform m_RewardFrame; + + public Transform m_FxPoint; + + public IXUIButton m_OnceButton; + + public IXUIButton m_TenButton; + + public IXUILabel[] m_DisplayLabel = new IXUILabel[3]; + + public IXUISprite[] m_DisplayPoint = new IXUISprite[3]; + + public IUIDummy[] m_DisplayAvatar = new IUIDummy[3]; + + public IXUISprite m_BackButton; + + public IXUIButton m_ItemListButton; + + public IXUIButton m_OKButton; + + public XUIPool m_ResultPool = new XUIPool(XSingleton.singleton.m_uiTool); + + private void Awake() + { + this.m_DisplayFrame = base.transform.Find("Bg/DisplayFrame"); + this.m_RewardFrame = base.transform.Find("Bg/RewardFrame"); + this.m_FxPoint = base.transform.Find("Bg/FxPoint"); + this.m_OnceButton = (this.m_DisplayFrame.Find("Once").GetComponent("XUIButton") as IXUIButton); + this.m_TenButton = (this.m_DisplayFrame.Find("Ten").GetComponent("XUIButton") as IXUIButton); + for (int i = 0; i < 3; i++) + { + this.m_DisplayLabel[i] = (this.m_DisplayFrame.Find(string.Format("Display{0}/Label", i)).GetComponent("XUILabel") as IXUILabel); + this.m_DisplayPoint[i] = (this.m_DisplayFrame.Find(string.Format("Display{0}/Bg/Point", i)).GetComponent("XUISprite") as IXUISprite); + this.m_DisplayAvatar[i] = (this.m_DisplayFrame.Find(string.Format("Display{0}/Bg/avatar", i)).GetComponent("UIDummy") as IUIDummy); + } + this.m_BackButton = (this.m_DisplayFrame.Find("Back").GetComponent("XUISprite") as IXUISprite); + this.m_ItemListButton = (this.m_DisplayFrame.Find("ItemList").GetComponent("XUIButton") as IXUIButton); + this.m_OKButton = (this.m_RewardFrame.Find("OK").GetComponent("XUIButton") as IXUIButton); + Transform transform = this.m_RewardFrame.Find("ResultTpl"); + this.m_ResultPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false); + } + } +} -- cgit v1.1-26-g67d0