立绘加载错误修改

dev_chengFeng
jiaoyangna 2020-11-06 16:37:52 +08:00
parent ccdba2b2df
commit cd99dd509b
2 changed files with 16 additions and 2 deletions

View File

@ -3309,6 +3309,21 @@ function this.LoadHerolive(_heroData, _objPoint)
end) end)
return testLive return testLive
end end
--根据界面数据加载动态立绘
function this.LoadHerolive1(data, _objPoint)
--TODO:动态加载立绘
local testLive = poolManager:LoadLive(GetResourcePath(data.Live), _objPoint.transform,
Vector3.one * data.Scale, Vector3.New(data.Position[1], data.Position[2], 0))
local SkeletonGraphic = testLive:GetComponent("SkeletonGraphic")
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle
poolManager:SetLiveClearCall(GetResourcePath(data.Live), testLive, function ()
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete - idle
end)
return testLive
end
function this.SortHeroDatas(_heroDatas) function this.SortHeroDatas(_heroDatas)
local teamHero = FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL) local teamHero = FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL)
--上阵最优先星级优先同星级等级优先同星级同等级按sortId排序。排序时降序排序。 --上阵最优先星级优先同星级等级优先同星级同等级按sortId排序。排序时降序排序。

View File

@ -151,8 +151,7 @@ function RoleSkinPanel:BtnAction(skinId,data)
else else
poolManager:UnLoadLive(curHeroData.live, parent.curLiveObj) poolManager:UnLoadLive(curHeroData.live, parent.curLiveObj)
curLiveName = GetResourcePath(data.Live) curLiveName = GetResourcePath(data.Live)
parent.curLiveObj = poolManager:LoadLive(GetResourcePath(data.Live), parent.curObj.transform, parent.curLiveObj = HeroManager.LoadHerolive1(data,parent.curObj)
Vector3.one * data.Scale, Vector3.New(data.Position[1], data.Position[2], 0))
PopupTipPanel.ShowTip("未获得此皮肤!") PopupTipPanel.ShowTip("未获得此皮肤!")
end end
end end