图鉴添加皮肤页签
parent
dd98250771
commit
c86307d328
|
@ -409,18 +409,21 @@ end
|
|||
local beginV3
|
||||
local endV3
|
||||
local distance
|
||||
|
||||
function HandBookHeroInfoPanel:OnBeginDrag(Pointgo, data)
|
||||
beginV3=this.curLiveObj.transform.anchoredPosition
|
||||
end
|
||||
|
||||
function HandBookHeroInfoPanel:OnDrag(Pointgo, data)
|
||||
distance=Vector2.Distance(beginV3,this.curLiveObj.transform.anchoredPosition)
|
||||
end
|
||||
|
||||
function HandBookHeroInfoPanel:OnEndDrag(Pointgo, data)
|
||||
endV3=this.curLiveObj.transform.anchoredPosition
|
||||
if distance>250 and endV3.x<0 then
|
||||
self:RightBtnOnClick()
|
||||
this:RightBtnOnClick()
|
||||
elseif distance>250 and endV3.x>0 then
|
||||
self:LeftBtnOnClick()
|
||||
this:LeftBtnOnClick()
|
||||
else
|
||||
this.curLiveObj:GetComponent("RectTransform"):DOAnchorPos(Vector2.New(heroConFigData.Position[1],heroConFigData.Position[2]), 0.5, false):SetEase(Ease.Linear)
|
||||
end
|
||||
|
@ -429,7 +432,14 @@ end
|
|||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function HandBookHeroInfoPanel:OnClose()
|
||||
|
||||
for _, page in pairs(this.PageList) do
|
||||
if page.OnHide then
|
||||
page:OnHide()
|
||||
end
|
||||
if page.OnClose then
|
||||
page:OnClose()
|
||||
end
|
||||
end
|
||||
if this.leftLiveObj then
|
||||
poolManager:UnLoadLive(GetResourcePath(leftHeroData.Live), this.leftLiveObj)
|
||||
this.leftLiveObj = nil
|
||||
|
|
|
@ -130,6 +130,7 @@ function HandBookRoleSkinPanel:BtnAction(skinId,data)
|
|||
end
|
||||
|
||||
function HandBookRoleSkinPanel:OnHide()
|
||||
LogGreen("11111111111111111111111111111111111")
|
||||
this.gameObject:SetActive(false)
|
||||
if parent then
|
||||
parent:ChangeCurentHeroSkinLive()
|
||||
|
|
Loading…
Reference in New Issue