From db821399a176a1cd78f8c96f5fa0c66c0c7edfa7 Mon Sep 17 00:00:00 2001 From: wangzhenxing <1545929779@qq.com> Date: Wed, 22 Nov 2023 19:20:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E8=AE=AD=E5=BB=BA=E7=AD=91=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/HomeLand/TrainBuildPanel.prefab | 6 +++--- .../Prefabs/UI/Main/MainPanel.prefab | 4 ++-- .../~Lua/Common/GlobalDefine.lua | 4 ++++ .../~Lua/Modules/Main/MainPanel.lua | 21 ++++++++++++------- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/HomeLand/TrainBuildPanel.prefab b/Assets/ManagedResources/Prefabs/UI/HomeLand/TrainBuildPanel.prefab index 0082e421c5..464e034c2b 100644 --- a/Assets/ManagedResources/Prefabs/UI/HomeLand/TrainBuildPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/HomeLand/TrainBuildPanel.prefab @@ -173531,8 +173531,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 70, y: 90} - m_SizeDelta: {x: 140, y: 121} + m_AnchoredPosition: {x: 37, y: 90} + m_SizeDelta: {x: 79, y: 175} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8918600171810824958 CanvasRenderer: @@ -173562,7 +173562,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 2887ec8dbdcb57242a540f77f7cb5a72, type: 3} + m_Sprite: {fileID: 21300000, guid: 8561d25febfc8bc428011c49f29d126b, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/Assets/ManagedResources/Prefabs/UI/Main/MainPanel.prefab b/Assets/ManagedResources/Prefabs/UI/Main/MainPanel.prefab index a6e67a0c66..d9dd4cd8cc 100644 --- a/Assets/ManagedResources/Prefabs/UI/Main/MainPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Main/MainPanel.prefab @@ -467,7 +467,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 264.4, y: 250} + m_AnchoredPosition: {x: 264.4, y: 9} m_SizeDelta: {x: 181, y: 46} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1586863083 @@ -95835,7 +95835,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: "\u6D1E\u5E9C" + m_Text: "\u7279\u8BAD" --- !u!114 &6425935167435302397 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 8fddcfe524..58f07270d7 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -1810,6 +1810,8 @@ FUNCTION_OPEN_TYPE = { Gift=146, --礼物 Potency =147, --潜能 Number_Game=149,--数字游戏 + Train = 150, --特训 + TrainBuild = 151, --特训建筑 } @@ -2351,6 +2353,7 @@ FUNC_OPNE_STATE = { HOMELAND = "HOMELAND", HONGMENG="HONGMENG", GODWEAPON="GODWEAPON", + TRAINBUILD ="TRAINBUILD", } -- 开放功能ID作为索引键值,索引对应的字符串 @@ -2385,6 +2388,7 @@ FUNC_OPEN_STR = { [FUNCTION_OPEN_TYPE.HOMELAND] = FUNC_OPNE_STATE.HOMELAND, [FUNCTION_OPEN_TYPE.HongMengZhen] = FUNC_OPNE_STATE.HONGMENG, [FUNCTION_OPEN_TYPE.GodWeapon] = FUNC_OPNE_STATE.GODWEAPON, + [FUNCTION_OPEN_TYPE.TrainBuild] = FUNC_OPNE_STATE.TRAINBUILD, } -- 地图中图标对应的ID diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index 9fde66c3d9..76ce5c994f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -227,7 +227,7 @@ function this:InitComponent() [FUNCTION_OPEN_TYPE.SHOP] = this:InsertNewText(this.btnShangdian), [FUNCTION_OPEN_TYPE.HERO_RESOLVE] = this:InsertNewText(this.btnFenjie), [FUNCTION_OPEN_TYPE.ARENA] = this:InsertNewText(this.btnJingjichang), - [FUNCTION_OPEN_TYPE.HOMELAND] = this:InsertNewText(this.btnHomeLand), + --[FUNCTION_OPEN_TYPE.HOMELAND] = this:InsertNewText(this.btnHomeLand), [FUNCTION_OPEN_TYPE.COMPOUND] = this:InsertNewText(this.btnEquipCompound), [FUNCTION_OPEN_TYPE.RECURITY] = this:InsertNewText(this.btnRecruit), --[FUNCTION_OPEN_TYPE.ELEMENT_RECURITY] = this:InsertNewText(this.btnElementDrawCard), @@ -236,6 +236,7 @@ function this:InitComponent() --[FUNCTION_OPEN_TYPE.tianshumijuan] = this:InsertNewText(this.btnTianShuMiJuan), [FUNCTION_OPEN_TYPE.GodWeapon] = this:InsertNewText(this.btnXingYunTanBao),--幸运探宝 [FUNCTION_OPEN_TYPE.JumpServer] = this:InsertNewText(this.btnJumpServer),--跨服 + [FUNCTION_OPEN_TYPE.TrainBuild] = this:InsertNewText(this.btnHomeLand),--特训 } -- 红点 @@ -584,11 +585,16 @@ function this:BindEvent() end) Util.AddClick(this.btnHomeLand, function() --JumpManager.GoJump(40059) - - NetManager.TrainingArchitectureInfoRequest(function() - UIManager.OpenPanel(UIName.TrainBuildPanel) - end) - this.ScenceBtnClick(FUNCTION_OPEN_TYPE.HOMELAND) + if (ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.TrainBuild)) then + NetManager.TrainingArchitectureInfoRequest(function() + UIManager.OpenPanel(UIName.TrainBuildPanel) + end) + else + local tip = ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.TrainBuild) + PopupTipPanel.ShowTip(tip) + end + + this.ScenceBtnClick(FUNCTION_OPEN_TYPE.TrainBuild) -- if ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.ENDLESS) then -- PlayerManager.carbonType = 2 -- UIManager.OpenPanel(UIName.CarbonTypePanelV2) @@ -1365,6 +1371,7 @@ function this:OnShow() PlayerManager.StarBattleUpLvTipTime(1) this.battleUpLvTip:SetActive(false) this.btnShenzun:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.NewShenzun)) + this.btnHomeLand:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.TrainBuild)) this.btn_weapon:SetActive(false) --检测灵兽红点 @@ -1411,7 +1418,7 @@ end function this.OnUpdate() --主城人物层级处理 this.OnMainPlayerNPCRefresh() - this.CheckScreenRightRedPoint() + --this.CheckScreenRightRedPoint() end --检测屏幕右侧红点