修复连续点击导致战斗界面打开多次导致报错,立绘重叠的问题

dev_chengFeng
gaoxin 2020-08-26 22:35:57 +08:00 committed by JieLing
parent 241a858968
commit 3dc8330e4b
2 changed files with 10 additions and 2 deletions

View File

@ -240,6 +240,11 @@ end
--打开面板
function UIManager.OpenPanel(id, ...)
-- 如果是
if id == UIName.BattlePanel and this.IsOpen(UIName.BattlePanel) then
LogError("战斗界面重复打开!!")
return
end
return UIManager.GetPanel(id, true, nil, ...)
end

View File

@ -204,7 +204,7 @@ function RoleView.New(go, role, position, root)
instance.rageSlider = Util.GetGameObject(go, "rageProgress/rage"):GetComponent("Image")
instance.rageText = Util.GetGameObject(go, "rageProgress/Text"):GetComponent("Text")
instance.effect_rage = Util.GetGameObject(go, "rageProgress/effect")
instance.effect_dead:SetActive(instance.role.Rage >= 4)
instance.effect_rage:SetActive(instance.role.Rage >= 4)
instance.rageSlider.fillAmount = instance.role.Rage / 4
instance.rageText.gameObject:SetActive(false)
instance.rageText.text = ""
@ -800,7 +800,10 @@ function RoleView:OnSkillCast(skill)
if self.rlgTween3 then self.rlgTween3:Kill() end
self.rlgTween3 = self.RoleLiveGO.transform:DOLocalMove(Vector3.New(self.outOffset[1], self.outOffset[2] - 220, 0), 0.3, false):SetEase(Ease.OutSine)
if self.liveRender then
self.liveRender.transform:SetParent(Util.GetGameObject(self.GameObject, "Mask2").transform)
local mask2 = Util.GetGameObject(self.GameObject, "Mask2")
if mask2 then
self.liveRender.transform:SetParent(mask2.transform)
end
end
local cardRenderMat = self.liveRender.material
cardRenderMat:SetInt("_IsMask", 0)