英雄左右快速切换 ui 重叠
parent
1942875c2e
commit
3fb2bae218
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
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -331,6 +334,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]
|
||||
|
@ -361,7 +365,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
|
||||
|
||||
|
@ -370,6 +375,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]
|
||||
|
@ -401,6 +407,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
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -310,6 +313,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]
|
||||
|
@ -334,7 +338,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)
|
||||
|
||||
|
@ -345,6 +350,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]
|
||||
|
@ -372,6 +378,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