英雄左右快速切换 ui 重叠
parent
b90b306f49
commit
20e064b178
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -72,6 +72,9 @@ function HandBookHeroInfoPanel:InitComponent()
|
|||
this.btnList = Util.GetGameObject(self.transform,"btnList")
|
||||
this.btnPre = Util.GetGameObject(self.transform,"btnInfo")
|
||||
this.select = Util.GetGameObject(self.transform, "selectBtn")
|
||||
|
||||
this.btnMask = Util.GetGameObject(self.transform, "btnMask")
|
||||
this.btnMask.gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -328,6 +331,7 @@ function HandBookHeroInfoPanel:RightBtnOnClick()
|
|||
if isClickLeftOrRightBtn == false then
|
||||
return
|
||||
end
|
||||
this.btnMask.gameObject:SetActive(true)
|
||||
isClickLeftOrRightBtn = false
|
||||
self.rightBtn:GetComponent("Button").enabled = false
|
||||
local oldIndexConfigData = heroDatas[index]
|
||||
|
@ -358,7 +362,8 @@ function HandBookHeroInfoPanel:RightBtnOnClick()
|
|||
SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
|
||||
this.rightBtn:GetComponent("Button").enabled = true
|
||||
isClickLeftOrRightBtn = true
|
||||
this:UpdateHeroInfoData()
|
||||
this:UpdateHeroInfoData()
|
||||
this.btnMask.gameObject:SetActive(false)
|
||||
end):SetEase(Ease.Linear)
|
||||
end
|
||||
|
||||
|
@ -367,6 +372,7 @@ function HandBookHeroInfoPanel:LeftBtnOnClick()
|
|||
if isClickLeftOrRightBtn == false then
|
||||
return
|
||||
end
|
||||
this.btnMask.gameObject:SetActive(true)
|
||||
isClickLeftOrRightBtn = false
|
||||
self.leftBtn:GetComponent("Button").enabled = false
|
||||
local oldIndexConfigData = heroDatas[index]
|
||||
|
@ -398,6 +404,7 @@ function HandBookHeroInfoPanel:LeftBtnOnClick()
|
|||
this.leftBtn:GetComponent("Button").enabled = true
|
||||
isClickLeftOrRightBtn = true
|
||||
this:UpdateHeroInfoData()
|
||||
this.btnMask.gameObject:SetActive(false)
|
||||
end):SetEase(Ease.Linear)
|
||||
end
|
||||
|
||||
|
|
|
@ -118,6 +118,9 @@ function RoleInfoPanel:InitComponent()
|
|||
this.rightBtn = Util.GetGameObject(self.transform, "rightBtn/GameObject")
|
||||
-- 上部货币显示
|
||||
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft})
|
||||
|
||||
this.btnMask = Util.GetGameObject(self.transform, "rolePanel/btnMask")
|
||||
this.btnMask.gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -309,6 +312,7 @@ function this:RightBtnOnClick()
|
|||
return
|
||||
end
|
||||
isClickLeftOrRightBtn = false
|
||||
this.btnMask.gameObject:SetActive(true)
|
||||
local oldIndexConfigData = heroDatas[index]
|
||||
index = (index + 1 <= #heroDatas and index + 1 or 1)
|
||||
curHeroData = heroDatas[index]
|
||||
|
@ -333,7 +337,8 @@ function this:RightBtnOnClick()
|
|||
SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
|
||||
this.rightBtn:GetComponent("Button").enabled = true
|
||||
isClickLeftOrRightBtn = true
|
||||
this:UpdateHeroInfoData()
|
||||
this:UpdateHeroInfoData()
|
||||
this.btnMask.gameObject:SetActive(false)
|
||||
end):SetEase(Ease.Linear)
|
||||
this:SetPanelBg(curHeroData.heroConfig)
|
||||
|
||||
|
@ -344,6 +349,7 @@ function this:LeftBtnOnClick()
|
|||
if isClickLeftOrRightBtn == false then
|
||||
return
|
||||
end
|
||||
this.btnMask.gameObject:SetActive(true)
|
||||
isClickLeftOrRightBtn = false
|
||||
this.leftBtn:GetComponent("Button").enabled = false
|
||||
local oldIndexConfigData = heroDatas[index]
|
||||
|
@ -371,6 +377,7 @@ function this:LeftBtnOnClick()
|
|||
this.leftBtn:GetComponent("Button").enabled = true
|
||||
isClickLeftOrRightBtn = true
|
||||
this:UpdateHeroInfoData()
|
||||
this.btnMask.gameObject:SetActive(false)
|
||||
end):SetEase(Ease.Linear)
|
||||
this:SetPanelBg(curHeroData.heroConfig)
|
||||
|
||||
|
|
Loading…
Reference in New Issue