【角色信息】修复回收立绘错误

dev_chengFeng
gaoxin 2021-12-31 17:55:01 +08:00
parent d1b84299c2
commit 0c9b3b4f96
2 changed files with 5 additions and 4 deletions

View File

@ -417,7 +417,7 @@ function HandBookHeroInfoPanel:RightBtnOnClick()
this.rightLiveObj:GetComponent("RectTransform"):DOAnchorPos(Vector2.New(rightHeroData.Position[1],rightHeroData.Position[2]), 0.3, false):SetDelay(0.2):OnComplete(function ()
this:UpdateLiveList()
if this.curLiveObj then
poolManager:UnLoadLive(this.curLiveObj.name, this.leftLiveObj)
poolManager:UnLoadLive(this.curLiveObj.name, this.curLiveObj)
this.curLiveObj = nil
end
Util.ClearChild(self.leftObj.transform)
@ -462,7 +462,7 @@ function HandBookHeroInfoPanel:LeftBtnOnClick()
this.leftLiveObj:GetComponent("RectTransform"):DOAnchorPos(Vector2.New(leftHeroData.Position[1],leftHeroData.Position[2]), 0.3, false):SetDelay(0.2):OnComplete(function ()
this:UpdateLiveList()
if this.curLiveObj then
poolManager:UnLoadLive(this.curLiveObj.name, this.rightLiveObj)
poolManager:UnLoadLive(this.curLiveObj.name, this.curLiveObj)
this.curLiveObj = nil
end
Util.ClearChild(self.rightObj.transform)

View File

@ -408,7 +408,8 @@ function this:RightBtnOnClick()
this.rightLiveObj:GetComponent("RectTransform"):DOAnchorPos(Vector2.New(rightHeroData.position[1],rightHeroData.position[2]), 0.3, false):SetDelay(0.2):OnComplete(function ()
this:UpdateLiveList()
if this.curLiveObj then
poolManager:UnLoadLive(this.curLiveObj.name, this.leftLiveObj)
Log("Recycle:"..tostring(this.leftLiveObj))
poolManager:UnLoadLive(this.curLiveObj.name, this.curLiveObj)
this.curLiveObj = nil
end
Util.ClearChild(this.leftObj.transform)
@ -477,7 +478,7 @@ function this:LeftBtnOnClick()
this.leftLiveObj:GetComponent("RectTransform"):DOAnchorPos(Vector2.New(leftHeroData.position[1],leftHeroData.position[2]), 0.3, false):SetDelay(0.2):OnComplete(function ()
this:UpdateLiveList()
if this.curLiveObj then
poolManager:UnLoadLive(this.curLiveObj.name, this.rightLiveObj)
poolManager:UnLoadLive(this.curLiveObj.name, this.curLiveObj)
this.curLiveObj = nil
end
Util.ClearChild(this.rightObj.transform)