From 958254f93dbfc1d4c395b2a830d980e5fbffcaa5 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Fri, 9 Jul 2021 16:56:05 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A5=9E=E5=B0=86=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E3=80=91=E5=8D=87=E7=BA=A7=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Harmony/Manager/HarmonyManager.lua | 3 +++ .../~Lua/Modules/RoleInfo/RoleInfoLayout.lua | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua index c2bd3642cd..80b4ced01a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua @@ -667,4 +667,7 @@ function this.WarPowerChangeNotify(did) end end +function this.IsGongMing(_curHeroData) + return this.IsChangeColor(_curHeroData.dynamicId) or (this:IsEnvoy(_curHeroData.dynamicId) and this:HongMengTowerUpLimit() ~= 0) +end return HarmonyManager \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua index 65948379dc..34ec5362cc 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua @@ -87,13 +87,19 @@ end function RoleInfoLayout:BindEvent() --升级 Util.AddClick(this.upLvBtn, function() + if this.isGongMing then + PopupTipPanel.ShowTip("神将正在共鸣中,无法升级!") + return + end if Time.realtimeSinceStartup - RoleInfoLayout.timePressStarted <= 0.4 then - -- --LogGreen("upLvBtn ") this:LvUpClick(true) end end) --长按升级按下状态 this._onPointerDown = function(Pointgo, data) + if this.isGongMing then + return + end isTriggerLongClick = false _isClicked = true RoleInfoLayout.timePressStarted = Time.realtimeSinceStartup @@ -101,6 +107,10 @@ function RoleInfoLayout:BindEvent() end --长按升级抬起状态 this._onPointerUp = function(Pointgo, data) + if this.isGongMing then + PopupTipPanel.ShowTip("神将正在共鸣中,无法升级!") + return + end if _isLongPress and isTriggerLongClick then --连续升级抬起请求升级 this:LongLvUpClick(oldLv) @@ -268,8 +278,8 @@ function this:UpdateHeroUpLvAndBreakMaterialShow() end end - local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or (HarmonyManager:IsEnvoy(curHeroData.dynamicId) and HarmonyManager:HongMengTowerUpLimit() ~= 0) - if isGongMing then + this.isGongMing = HarmonyManager.IsGongMing(curHeroData) + if this.isGongMing then this.gongmingText:SetActive(true) this.upLv:SetActive(false) -- this.upLvBtn:SetActive(false)