修复公会boss立绘会创建多次的问题

dev_chengFeng
gaoxin 2020-08-26 17:58:46 +08:00
parent bab4148db6
commit fcf0557f01
1 changed files with 9 additions and 3 deletions

View File

@ -305,8 +305,11 @@ function GuildMainCityPanel:OnShow()
this.btnRedPacket:SetActive(false)
end
this.LiveName = "live2d_huyao"
this.LiveGO = poolManager:LoadLive(this.LiveName, this.btntranscriptLive.transform,
if not this.LiveGO then
this.LiveGO = poolManager:LoadLive(this.LiveName, this.btntranscriptLive.transform,
Vector3.one * 0.15, Vector3.New(0,0,0))
end
end
@ -586,8 +589,11 @@ function GuildMainCityPanel:OnDestroy()
this.playerHead = nil
poolManager:UnLoadLive(this.LiveName,this.LiveGO )
this.LiveName= nil
if this.LiveGO then
poolManager:UnLoadLive(this.LiveName,this.LiveGO)
this.LiveName = nil
this.LiveGO = nil
end
end
return GuildMainCityPanel