加载资源优化

This commit is contained in:
Fang 2023-08-29 17:11:27 +08:00
parent eb73910628
commit c22b887d48

View File

@ -211,8 +211,10 @@ end
-- 展示光效
function RewardCell:showLight(show, ui)
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)
self.isLoadingEffectLight = false
obj:setAnchoredPosition(0, 0)
obj:play()
end)