From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/GuildMineMainBehaviour.cs | 161 +++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/GuildMineMainBehaviour.cs (limited to 'Client/Assets/Scripts/XMainClient/GuildMineMainBehaviour.cs') diff --git a/Client/Assets/Scripts/XMainClient/GuildMineMainBehaviour.cs b/Client/Assets/Scripts/XMainClient/GuildMineMainBehaviour.cs new file mode 100644 index 00000000..0e457d8b --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/GuildMineMainBehaviour.cs @@ -0,0 +1,161 @@ +using System; +using UILib; +using UnityEngine; +using XMainClient.UI; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class GuildMineMainBehaviour : DlgBehaviourBase + { + public IXUIButton m_Close; + + public IXUIButton m_Help; + + public IXUIButton m_BtnExplore; + + public IXUIButton m_BtnChallenge; + + public IXUIButton m_BtnExploreAgain; + + public IXUIButton m_BtnWarehouse; + + public IXUIButton m_BtnRank; + + public IXUIButton m_BtnTeam; + + public IXUILabel m_MemberNum; + + public Transform m_PropsFrame; + + public Transform m_RankFrame; + + public IXUISprite m_RoleProtrait; + + public IXUILabel m_RoleName; + + public Transform m_selfBuffIcons; + + public IXUILabel m_TExplore; + + public IXUILabel m_ActivityTimeLabel; + + public IXUILabel m_ActivityTimeDescription; + + public XLeftTimeCounter m_ActivityCDCounter; + + public Transform m_Exploring; + + public IXUILabel m_ExploreTimeLabel; + + public IXUISlider m_ExploreTimeSlider; + + public XLeftTimeCounter m_ExploreCDCounter; + + public IXUITweenTool m_NewFindTween; + + public IXUITweenTool m_BossTween; + + public IXUIScrollView m_RecordScrollView; + + public XUIPool m_BossPool = new XUIPool(XSingleton.singleton.m_uiTool); + + public XUIPool m_BossMinePool = new XUIPool(XSingleton.singleton.m_uiTool); + + public XUIPool m_BuffTipPool = new XUIPool(XSingleton.singleton.m_uiTool); + + public XUIPool m_GuildBuffReviewPool = new XUIPool(XSingleton.singleton.m_uiTool); + + public XUIPool m_GuildBuffRecordPool = new XUIPool(XSingleton.singleton.m_uiTool); + + public Transform[] m_NoLook = new Transform[XGuildMineMainDocument.BOSS_NUM_MAX]; + + public Transform[] m_BossTpl = new Transform[XGuildMineMainDocument.BOSS_NUM_MAX]; + + public IXUILabel[] m_BossName = new IXUILabel[XGuildMineMainDocument.BOSS_NUM_MAX]; + + public IXUISprite[] m_BossSp = new IXUISprite[XGuildMineMainDocument.BOSS_NUM_MAX]; + + public IXUITexture[] m_BossTex = new IXUITexture[XGuildMineMainDocument.BOSS_NUM_MAX]; + + public Transform[] m_BossSelect = new Transform[XGuildMineMainDocument.BOSS_NUM_MAX]; + + public IXUILabel[] m_BossLevel = new IXUILabel[XGuildMineMainDocument.BOSS_NUM_MAX]; + + public Transform[,] m_BossMine = new Transform[(int)XGuildMineMainDocument.BOSS_NUM_MAX, (int)XGuildMineMainDocument.MINE_NUM_MAX]; + + public IXUISprite[] m_BossBuff = new IXUISprite[XGuildMineMainDocument.BOSS_NUM_MAX]; + + public IXUILabel[] m_BossBuffText = new IXUILabel[XGuildMineMainDocument.BOSS_NUM_MAX]; + + 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_BtnExplore = (base.transform.Find("Bg/Btn/BtnExplore").GetComponent("XUIButton") as IXUIButton); + this.m_BtnChallenge = (base.transform.Find("Bg/Btn/BtnChallenge").GetComponent("XUIButton") as IXUIButton); + this.m_BtnExploreAgain = (base.transform.Find("Bg/Btn/BtnExploreAgain").GetComponent("XUIButton") as IXUIButton); + this.m_BtnWarehouse = (base.transform.Find("Bg/Btn/BtnCk").GetComponent("XUIButton") as IXUIButton); + this.m_BtnRank = (base.transform.Find("Bg/Btn/BtnRank").GetComponent("XUIButton") as IXUIButton); + this.m_BtnTeam = (base.transform.Find("Bg/Btn/BtnTeam").GetComponent("XUIButton") as IXUIButton); + this.m_MemberNum = (this.m_BtnTeam.gameObject.transform.Find("MemberNum").GetComponent("XUILabel") as IXUILabel); + this.m_PropsFrame = base.transform.Find("Bg/PropsFrame"); + this.m_RankFrame = base.transform.Find("Bg/RankFrame"); + this.m_selfBuffIcons = base.transform.Find("Bg/InfoSelf/BuffIcons"); + this.m_RoleProtrait = (base.transform.Find("Bg/InfoSelf/P").GetComponent("XUISprite") as IXUISprite); + this.m_RoleName = (base.transform.Find("Bg/InfoSelf/T").GetComponent("XUILabel") as IXUILabel); + this.m_TExplore = (this.m_BtnExplore.gameObject.transform.Find("T").GetComponent("XUILabel") as IXUILabel); + this.m_ActivityTimeLabel = (base.transform.Find("Bg/Time").GetComponent("XUILabel") as IXUILabel); + this.m_ActivityTimeDescription = (base.transform.Find("Bg/Time/T").GetComponent("XUILabel") as IXUILabel); + this.m_ActivityCDCounter = new XLeftTimeCounter(this.m_ActivityTimeLabel, false); + this.m_Exploring = base.transform.Find("Bg/Searching"); + this.m_ExploreTimeLabel = (base.transform.Find("Bg/Searching/Time").GetComponent("XUILabel") as IXUILabel); + this.m_ExploreTimeSlider = (base.transform.Find("Bg/Searching/LoadingProgress").GetComponent("XUISlider") as IXUISlider); + this.m_ExploreCDCounter = new XLeftTimeCounter(this.m_ExploreTimeLabel, false); + this.m_NewFindTween = (base.transform.Find("Bg/NewFind").GetComponent("XUIPlayTween") as IXUITweenTool); + this.m_BossTween = (base.transform.Find("Bg/PVE").GetComponent("XUIPlayTween") as IXUITweenTool); + this.m_RecordScrollView = (base.transform.Find("Bg/Log/BuffRecords").GetComponent("XUIScrollView") as IXUIScrollView); + this.m_BuffTipPool.SetupPool(null, base.transform.Find("Bg/InfoBuff/InfoBuffTpl").gameObject, 4u, false); + this.m_GuildBuffReviewPool.SetupPool(base.transform.Find("Bg/InfoGuild").gameObject, base.transform.Find("Bg/InfoGuild/InfoGuildTpl").gameObject, 3u, false); + this.m_GuildBuffRecordPool.SetupPool(base.transform.Find("Bg/Log/BuffRecords").gameObject, base.transform.Find("Bg/Log/BuffRecords/LogItem").gameObject, 2u, false); + this.m_BossMinePool.SetupPool(null, base.transform.Find("Bg/PVE/BossTpl/Mine/MineTpl").gameObject, XGuildMineMainDocument.MINE_NUM_MAX, false); + this.m_BossMinePool.FakeReturnAll(); + int num = 0; + while ((long)num < (long)((ulong)XGuildMineMainDocument.MINE_NUM_MAX)) + { + GameObject gameObject = this.m_BossMinePool.FetchGameObject(false); + gameObject.transform.localPosition = new Vector3((float)(((double)((float)num + 0.5f) - XGuildMineMainDocument.MINE_NUM_MAX / 2.0) * (double)this.m_BossMinePool.TplWidth), 0f, 0f); + gameObject.name = string.Format("Mine{0}", num); + num++; + } + this.m_BossMinePool.ActualReturnAll(false); + this.m_BossPool.SetupPool(null, base.transform.Find("Bg/PVE/BossTpl").gameObject, XGuildMineMainDocument.BOSS_NUM_MAX, false); + this.m_BossPool.FakeReturnAll(); + int num2 = 0; + while ((long)num2 < (long)((ulong)XGuildMineMainDocument.BOSS_NUM_MAX)) + { + GameObject gameObject2 = this.m_BossPool.FetchGameObject(false); + Transform transform = base.transform.Find(string.Format("Bg/PVE/Boss{0}", num2 + 1)); + XSingleton.singleton.AddChild(transform.gameObject, gameObject2); + this.m_BossTpl[num2] = gameObject2.transform; + this.m_BossName[num2] = (this.m_BossTpl[num2].Find("Name").GetComponent("XUILabel") as IXUILabel); + this.m_BossSp[num2] = (this.m_BossTpl[num2].Find("Boss").GetComponent("XUISprite") as IXUISprite); + this.m_BossTex[num2] = (this.m_BossTpl[num2].Find("Tex").GetComponent("XUITexture") as IXUITexture); + this.m_BossSelect[num2] = this.m_BossTpl[num2].Find("Select"); + this.m_BossLevel[num2] = (this.m_BossTpl[num2].Find("Grade").GetComponent("XUILabel") as IXUILabel); + this.m_NoLook[num2] = this.m_BossTpl[num2].Find("NoLook"); + int num3 = 0; + while ((long)num3 < (long)((ulong)XGuildMineMainDocument.MINE_NUM_MAX)) + { + this.m_BossMine[num2, num3] = this.m_BossTpl[num2].Find(string.Format("Mine/Mine{0}/Mine", num3)); + num3++; + } + this.m_BossBuff[num2] = (this.m_BossTpl[num2].Find("Buff").GetComponent("XUISprite") as IXUISprite); + this.m_BossBuffText[num2] = (this.m_BossTpl[num2].Find("Buff/T").GetComponent("XUILabel") as IXUILabel); + num2++; + } + this.m_BossPool.ActualReturnAll(false); + } + } +} -- cgit v1.1-26-g67d0