【皮肤】修复未解锁皮肤,拖动不切换回到默认位置时显示错误
parent
03e3d77bb6
commit
f26796653d
|
@ -26,6 +26,7 @@ local tabs = {
|
|||
local curHeroData--当前英雄信息
|
||||
local leftHeroData--左边预加载英雄信息
|
||||
local rightHeroData--右边预加载英雄信息
|
||||
local curHeroPosition --
|
||||
|
||||
local heroDatas--所有英雄list信息
|
||||
|
||||
|
@ -581,6 +582,8 @@ function this:ChangeCurentHeroSkinLive(herodata)
|
|||
end
|
||||
if herodata then
|
||||
this.curLiveObj=HeroManager.LoadHerolive1(herodata,this.curObj)
|
||||
-- 临时保存皮肤位置
|
||||
curHeroPosition = herodata.Position
|
||||
else
|
||||
local allAddProVal = {}
|
||||
if isUpZhen then
|
||||
|
@ -592,6 +595,8 @@ function this:ChangeCurentHeroSkinLive(herodata)
|
|||
end
|
||||
this.force.text =allAddProVal[HeroProType.WarPower]
|
||||
this.curLiveObj=HeroManager.LoadHerolive(curHeroData,this.curObj)
|
||||
-- 清空临时保存的皮肤位置
|
||||
curHeroPosition = nil
|
||||
end
|
||||
this:SetDragView()
|
||||
end
|
||||
|
@ -621,7 +626,8 @@ function RoleInfoPanel:OnEndDrag(Pointgo, data)
|
|||
elseif distance>250 and endV3.x>0 then
|
||||
this:LeftBtnOnClick()
|
||||
else
|
||||
this.curLiveObj:GetComponent("RectTransform"):DOAnchorPos(Vector2.New(curHeroData.position[1],curHeroData.position[2]), 0.5, false):SetEase(Ease.Linear)
|
||||
local pos = curHeroPosition or curHeroData.position
|
||||
this.curLiveObj:GetComponent("RectTransform"):DOAnchorPos(Vector2.New(pos[1], pos[2]), 0.5, false):SetEase(Ease.Linear)
|
||||
end
|
||||
distance=0
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue