加载资源优化
This commit is contained in:
parent
eb73910628
commit
c22b887d48
@ -211,8 +211,10 @@ end
|
|||||||
-- 展示光效
|
-- 展示光效
|
||||||
function RewardCell:showLight(show, ui)
|
function RewardCell:showLight(show, ui)
|
||||||
self.rootEffect:removeAllChildren()
|
self.rootEffect:removeAllChildren()
|
||||||
if show and ui ~= nil then
|
if show and ui ~= nil and not self.isLoadingEffectLight then
|
||||||
|
self.isLoadingEffectLight = true
|
||||||
EffectManager:loadUIEffectAsync(EFFECT_LIGHT, ui, self.rootEffect, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
|
EffectManager:loadUIEffectAsync(EFFECT_LIGHT, ui, self.rootEffect, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
|
||||||
|
self.isLoadingEffectLight = false
|
||||||
obj:setAnchoredPosition(0, 0)
|
obj:setAnchoredPosition(0, 0)
|
||||||
obj:play()
|
obj:play()
|
||||||
end)
|
end)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user