From e54fc2faa94f5f075fea29c0b8ac90819f4b16bd Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Mon, 27 Sep 2021 21:43:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=B7=A6=E5=8F=B3=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Likability/HeroLikeAbilityPanel.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Likability/HeroLikeAbilityPanel.lua b/Assets/ManagedResources/~Lua/Modules/Likability/HeroLikeAbilityPanel.lua index 77cf047bbb..4f871e144c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Likability/HeroLikeAbilityPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Likability/HeroLikeAbilityPanel.lua @@ -263,6 +263,14 @@ function HeroLikeAbilityPanel:OnShow() self:UpdateHeroInfoData() Util.SetParticleSortLayer(self.effect,self.sortingOrder + 1) self.effect.gameObject:SetActive(false) + + if #herosDatas < 2 then + self.leftBtn.transform.parent.gameObject:SetActive(false) + self.rightBtn.transform.parent.gameObject:SetActive(false) + else + self.leftBtn.transform.parent.gameObject:SetActive(true) + self.rightBtn.transform.parent.gameObject:SetActive(true) + end end function HeroLikeAbilityPanel:UpdateHeroInfoData()