神魂星星修改提交
parent
de71cd524b
commit
028790a379
|
|
@ -409,6 +409,10 @@ function GetStarOrGodSoulLv(index,data)
|
|||
return data.star,index
|
||||
end
|
||||
|
||||
function SetOriScale()
|
||||
|
||||
end
|
||||
|
||||
--把英雄星级父对象和星级传过来 type 1 第6-11个预设 type 2 第12-17个预设 type 3 第18-24个预设
|
||||
function SetHeroStars(spLoader, starGrid, star, type,_starSize,_scale,_pivot,rotation)
|
||||
local starSize
|
||||
|
|
@ -434,16 +438,11 @@ function SetHeroStars(spLoader, starGrid, star, type,_starSize,_scale,_pivot,rot
|
|||
if _pivot then
|
||||
pivot = _pivot
|
||||
end
|
||||
local isHave = false
|
||||
local starPre = Util.GetGameObject(starGrid, "starGrid(Clone)")
|
||||
if starPre then
|
||||
local starPre = Util.GetGameObject(starGrid, "starGrid(Clone)")
|
||||
destroy(starPre)
|
||||
starPre = nil
|
||||
isHave = false
|
||||
end
|
||||
if not starPre then
|
||||
starPre = poolManager:LoadAsset("starGrid", PoolManager.AssetType.GameObject)
|
||||
isHave = false
|
||||
end
|
||||
|
||||
local size = starPre:GetComponent("RectTransform").sizeDelta
|
||||
size.y = starSize.y
|
||||
starPre.transform.sizeDelta = size
|
||||
|
|
@ -460,15 +459,15 @@ function SetHeroStars(spLoader, starGrid, star, type,_starSize,_scale,_pivot,rot
|
|||
if i > 18 and i <= star + 18 then
|
||||
starPre.transform:GetChild(i - 1).gameObject:SetActive(true)
|
||||
--starPre.transform:GetChild(i - 1):GetComponent("RectTransform").sizeDelta = starSize
|
||||
if not isHave then
|
||||
local fx_shenhun = Util.GetGameObject(starPre.transform:GetChild(i - 1),"fx_shenhun")
|
||||
if fx_shenhun then
|
||||
local fixedScale = 1/ Util.GetGameObject(fx_shenhun,"zong/Particle System").transform.localScale.x
|
||||
Util.SetParticleScale(fx_shenhun,fixedScale)
|
||||
Util.SetParticleScale(fx_shenhun,starSize.x)
|
||||
local pos = fx_shenhun.transform.localPosition
|
||||
pos.y = starSize.y
|
||||
fx_shenhun.transform.localPosition = pos
|
||||
end
|
||||
end
|
||||
else
|
||||
starPre.transform:GetChild(i - 1).gameObject:SetActive(false)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue