抽卡立绘显示修改
parent
4ab9d1b98e
commit
a6d0814a13
|
@ -369,7 +369,7 @@ function SingleRecruitPanel:UpdataPanelData(_heroData)
|
|||
Sound_Recruit3 = SoundManager.PlaySound(SoundConfig.Sound_Recruit3)
|
||||
|
||||
if heroStaticData and not IsNull(testLiveGO) then
|
||||
poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO)
|
||||
poolManager:UnLoadLive(GetResourcePath(heroStaticData.Painting), testLiveGO)
|
||||
heroStaticData, testLiveGO = nil, nil
|
||||
end
|
||||
heroStaticData = heroConfigData[_heroData.heroId]
|
||||
|
@ -428,13 +428,13 @@ function SingleRecruitPanel:UpdataPanelData(_heroData)
|
|||
end
|
||||
|
||||
--TODO:动态加载立绘
|
||||
testLiveGO = poolManager:LoadLive(GetResourcePath(heroStaticData.Live), self.live2dRoot.transform,
|
||||
testLiveGO = poolManager:LoadLive(GetResourcePath(heroStaticData.Painting), self.live2dRoot.transform,
|
||||
Vector3.one * heroStaticData.Scale, Vector3.New(heroStaticData.Position[1],heroStaticData.Position[2],0))
|
||||
SetHEeroLiveToward(testLiveGO,heroStaticData.Toward,heroStaticData.Position)
|
||||
local SkeletonGraphic = testLiveGO:GetComponent("SkeletonGraphic")
|
||||
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle
|
||||
poolManager:SetLiveClearCall(GetResourcePath(heroStaticData.Live), testLiveGO, function ()
|
||||
poolManager:SetLiveClearCall(GetResourcePath(heroStaticData.Painting), testLiveGO, function ()
|
||||
if SkeletonGraphic and not IsNull(SkeletonGraphic) then
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete - idle
|
||||
end
|
||||
|
@ -500,7 +500,7 @@ function SingleRecruitPanel:OnClose()
|
|||
index=0
|
||||
this.CloseAllTimer()
|
||||
if heroStaticData then
|
||||
poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO)
|
||||
poolManager:UnLoadLive(GetResourcePath(heroStaticData.Painting), testLiveGO)
|
||||
end
|
||||
heroStaticData, testLiveGO = nil, nil
|
||||
this.StopPanelSound()
|
||||
|
|
Loading…
Reference in New Issue