From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/XMultiPkLoadingBehaviour.cs | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XMultiPkLoadingBehaviour.cs (limited to 'Client/Assets/Scripts/XMainClient/XMultiPkLoadingBehaviour.cs') diff --git a/Client/Assets/Scripts/XMainClient/XMultiPkLoadingBehaviour.cs b/Client/Assets/Scripts/XMainClient/XMultiPkLoadingBehaviour.cs new file mode 100644 index 00000000..4dfabb71 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XMultiPkLoadingBehaviour.cs @@ -0,0 +1,39 @@ +using System; +using UILib; +using UnityEngine; +using XMainClient.UI.UICommon; + +namespace XMainClient +{ + internal class XMultiPkLoadingBehaviour : DlgBehaviourBase + { + public IXUITweenTool m_PkLoadingTween; + + public IXUILabel[] m_Name = new IXUILabel[4]; + + public IXUILabel[] m_Score = new IXUILabel[4]; + + public IXUISprite[] m_Prefession = new IXUISprite[4]; + + public IXUITexture[] m_HalfPic = new IXUITexture[4]; + + private void Awake() + { + this.m_PkLoadingTween = (base.transform.Find("Bg").GetComponent("XUIPlayTween") as IXUITweenTool); + Transform transform = base.transform.Find("Bg/Left"); + Transform transform2 = base.transform.Find("Bg/Right"); + this.GetComp(transform.Find("P1").gameObject, 0); + this.GetComp(transform.Find("P2").gameObject, 1); + this.GetComp(transform2.Find("P3").gameObject, 2); + this.GetComp(transform2.Find("P4").gameObject, 3); + } + + public void GetComp(GameObject go, int index) + { + this.m_Name[index] = (go.transform.Find("Name").GetComponent("XUILabel") as IXUILabel); + this.m_Score[index] = (go.transform.Find("Score").GetComponent("XUILabel") as IXUILabel); + this.m_Prefession[index] = (go.transform.Find("Profession").GetComponent("XUISprite") as IXUISprite); + this.m_HalfPic[index] = (go.transform.Find("HalfPic").GetComponent("XUITexture") as IXUITexture); + } + } +} -- cgit v1.1-26-g67d0