From 81ce84e7be4529ecd5b93d15f43366b5f12085bb Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 14 Jan 2022 17:57:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E4=BF=AE=E6=94=B9=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/RoleInfo/RoleInfoLayout.prefab | 8 +-- .../Prefabs/UI/RoleInfo/RoleInfoPanel.prefab | 4 +- .../~Lua/Modules/RoleInfo/RoleInfoLayout.lua | 72 +++++++++---------- 3 files changed, 40 insertions(+), 44 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoLayout.prefab b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoLayout.prefab index 405a997849..77c97bb639 100644 --- a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoLayout.prefab +++ b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoLayout.prefab @@ -3877,7 +3877,7 @@ 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: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 85} m_Pivot: {x: 0, y: 0.5} --- !u!222 &35534546367631598 @@ -6429,9 +6429,9 @@ RectTransform: m_Father: {fileID: 5306787189736440502} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 58, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 58, y: -71.2} m_SizeDelta: {x: 0, y: 101} m_Pivot: {x: 0, y: 0.5} --- !u!222 &6149476631504047147 diff --git a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoPanel.prefab b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoPanel.prefab index 5c3900392a..b9f3babdff 100644 --- a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoPanel.prefab @@ -57624,9 +57624,9 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 116, y: -42} + m_AnchoredPosition: {x: 116, y: -212.78503} m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} + m_Pivot: {x: 0.5, y: 0} --- !u!114 &7854679572375693773 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua index a6ef49e4af..37664ff16e 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua @@ -216,6 +216,7 @@ function RoleInfoLayout:SetData(_sortinglayer,_parent,_curHerodata,_isUpZhen,_he --角色定位按钮 this.posBtn.gameObject:SetActive(curHeroData.heroConfig.ShowHeroLocation==1) this.posInfo.text = curHeroData.heroConfig.HeroLocationDesc1 + ForceRebuildLayout(this.posBtn.transform) end --更新英雄情报数据 @@ -727,36 +728,22 @@ end --更新英雄升级 和 突破数据 function this:UpdateHeroUpLvAndBreakData() -- 升级获取突破 和 升星相应heroRankUpConfig静态数据 - LogError("isHeroUpStar "..tostring(isHeroUpStar)) - if isHeroUpStar and upStarRankUpConfig and curTuPoRankUpConfig and curTuPoRankUpConfig.JudgeClass==1 and curHeroData.lv >= curTuPoRankUpConfig.OpenLevel then--当前突破全部完成 - this.tipUpLv.text=Language[11804] - this.tipUpLv.gameObject:SetActive(true) - this.itemGrid.gameObject:SetActive(false) - this.upLvBtnText.text=Language[11805] - --this.upLvBtnImage.sprite = this.spLoader:LoadSprite("r_hero_button_001")--r_chouka_button_004 - _isClicked = false - _isReqLvUp = false - else + --LogError("isHeroUpStar "..tostring(isHeroUpStar)) + if isHeroUpTuPo and upTuPoRankUpConfig and curHeroData.lv == upTuPoRankUpConfig.LimitLevel then--当前突破全部完成 this.itemGrid.gameObject:SetActive(true) this.tipUpLv.gameObject:SetActive(false) - LogError("isHeroUpTuPo "..tostring(isHeroUpTuPo)) - if isHeroUpTuPo and upTuPoRankUpConfig and curHeroData.lv == upTuPoRankUpConfig.LimitLevel then - this.upLvBtnText.text=Language[11805] - --this.upLvBtnImage.sprite = this.spLoader:LoadSprite("r_hero_button_001")--r_chouka_button_004 + this.upLvBtnText.text=Language[11805] + this.tipUpLv.text=Language[11804] + this.tipUpLv.gameObject:SetActive(false) + else + this.upLvBtnText.text=Language[11063] + if isHeroUpStar and curStarRankUpConfig and curHeroData.lv >= curStarRankUpConfig.OpenLevel then--当前突破全部完成 + this.tipUpLv.text=Language[11804] + this.tipUpLv.gameObject:SetActive(true) + this.itemGrid.gameObject:SetActive(false) else - this.upLvBtnText.text=Language[11063] - --this.upLvBtnImage.sprite = this.spLoader:LoadSprite("r_hero_button_002") - end - if isHeroUpStar and upStarRankUpConfig and curTuPoRankUpConfig and curTuPoRankUpConfig.JudgeClass==1 and curHeroData.lv >= curTuPoRankUpConfig.OpenLevel then--当前突破全部完成 - if curStarRankUpConfig then--进阶过处理 - if curHeroData.lv == curStarRankUpConfig.OpenLevel then - this.tipUpLv.text=Language[11804] - this.tipUpLv.gameObject:SetActive(false) - end - else--从未进阶过处理 - this.tipUpLv.text=Language[11804] - this.tipUpLv.gameObject:SetActive(false) - end + this.itemGrid.gameObject:SetActive(true) + this.tipUpLv.gameObject:SetActive(false) end end this:UpdateHeroUpLvAndBreakMaterialShow() @@ -776,6 +763,7 @@ function RoleInfoLayout:LvUpClick(isSingleLvUp) timer = 0 return end + --可以升星 是当前星级突破已满,等级也到了突破最大等级 if isHeroUpStar and upStarRankUpConfig and curTuPoRankUpConfig and curTuPoRankUpConfig.JudgeClass==1 and curHeroData.lv >= curTuPoRankUpConfig.OpenLevel then--当前突破全部完成 if curStarRankUpConfig then--进阶过处理 @@ -811,14 +799,26 @@ function RoleInfoLayout:LvUpClick(isSingleLvUp) end,Language[10731],showBtnTipStr) end else - if isUpLvMaterials then - this:DeleteLvUpMaterials() - else - _isClicked = false - if isHeroUpTuPo and curHeroData.lv == upTuPoRankUpConfig.LimitLevel then - PopupTipPanel.ShowTip(Language[11813]) + if isHeroUpTuPo and oldLv == upTuPoRankUpConfig.LimitLevel then --点击按钮之前的等级 == 突破最大等级 说明是突破 + if isUpLvMaterials then + this:DeleteLvUpMaterials() else - PopupTipPanel.ShowTip(Language[11814]) + PopupTipPanel.ShowTip(Language[11813]) + end + _isClicked = false + _isLongPress = false + this.isPressed = false + timer = 0 + elseif not isHeroUpTuPo or curHeroData.lv < upTuPoRankUpConfig.LimitLevel then + if isUpLvMaterials then + this:DeleteLvUpMaterials() + else + _isClicked = false + if isHeroUpTuPo and curHeroData.lv == upTuPoRankUpConfig.LimitLevel then + PopupTipPanel.ShowTip(Language[11813]) + else + PopupTipPanel.ShowTip(Language[11814]) + end end end end @@ -830,10 +830,6 @@ function RoleInfoLayout:LvUpClick(isSingleLvUp) end,Language[10731],Language[11809]) end elseif isHeroUpTuPo and oldLv == upTuPoRankUpConfig.LimitLevel then --点击按钮之前的等级 == 突破最大等级 说明是突破 - _isClicked = false - _isLongPress = false - this.isPressed = false - timer = 0 if isUpLvMaterials then this:DeleteLvUpMaterials() else