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/HeroAttrBehaviour.cs | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs (limited to 'Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs') diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs new file mode 100644 index 00000000..28f9e5bf --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs @@ -0,0 +1,62 @@ +using System; +using UILib; +using UnityEngine; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient.UI +{ + internal class HeroAttrBehaviour : DlgBehaviourBase + { + public IXUIButton m_Close; + + public GameObject m_HeroFrame; + + public GameObject m_SkillFrame; + + public GameObject m_GamePlayFrame; + + public IXUICheckBox[] m_Tab = new IXUICheckBox[3]; + + public IXUISprite m_HeroIcon; + + public IXUILabel m_HeroName; + + public IXUILabel m_HeroSmallTips; + + public IXUIScrollView m_DescScrollView; + + public XUIPool m_AttrPool = new XUIPool(XSingleton.singleton.m_uiTool); + + public XUIPool m_SkillPool = new XUIPool(XSingleton.singleton.m_uiTool); + + public IXUIScrollView m_ScrollView; + + public IXUILabel m_GamePlayTips; + + public IXUIScrollView m_GamePlayScrollView; + + private void Awake() + { + this.m_Close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton); + this.m_HeroFrame = base.transform.Find("HeroFrame").gameObject; + this.m_SkillFrame = base.transform.Find("SkillFrame").gameObject; + this.m_GamePlayFrame = base.transform.Find("GamePlayFrame").gameObject; + for (int i = 0; i < 3; i++) + { + this.m_Tab[i] = (base.transform.Find(string.Format("Tabs/Tab{0}", i)).GetComponent("XUICheckBox") as IXUICheckBox); + } + this.m_HeroIcon = (this.m_HeroFrame.transform.Find("Left/Hero").GetComponent("XUISprite") as IXUISprite); + this.m_HeroName = (this.m_HeroFrame.transform.Find("Left/Name").GetComponent("XUILabel") as IXUILabel); + this.m_HeroSmallTips = (this.m_HeroFrame.transform.Find("Left/ScrollView/Desc").GetComponent("XUILabel") as IXUILabel); + this.m_DescScrollView = (this.m_HeroFrame.transform.Find("Left/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView); + Transform transform = this.m_HeroFrame.transform.Find("Panel/Tpl"); + this.m_AttrPool.SetupPool(transform.parent.gameObject, transform.gameObject, 15u, false); + transform = this.m_SkillFrame.transform.Find("Panel/Tpl"); + this.m_SkillPool.SetupPool(transform.parent.gameObject, transform.gameObject, 15u, false); + this.m_ScrollView = (this.m_SkillFrame.transform.Find("Panel").GetComponent("XUIScrollView") as IXUIScrollView); + this.m_GamePlayTips = (this.m_GamePlayFrame.transform.Find("ScrollView/Desc").GetComponent("XUILabel") as IXUILabel); + this.m_GamePlayScrollView = (this.m_GamePlayFrame.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView); + } + } +} -- cgit v1.1-26-g67d0