This commit is contained in:
puxuan 2025-09-22 10:56:34 +08:00
parent 8424f7c65d
commit ba655fa257
2 changed files with 11 additions and 11 deletions

View File

@ -27,13 +27,13 @@ function PowerToastManager:showToast(before, after, posY)
self.bg = uiMap["power_change_toast.bg"] self.bg = uiMap["power_change_toast.bg"]
self.powerTx = uiMap["power_change_toast.bg.power_tx"] self.powerTx = uiMap["power_change_toast.bg.power_tx"]
self.powerChange = uiMap["power_change_toast.bg.power_change_tx"] self.powerChange = uiMap["power_change_toast.bg.power_change_tx"]
-- self.powerSpine = uiMap["power_change_toast.bg.ui_spine_obj"] self.powerSpine = uiMap["power_change_toast.bg.ui_spine_obj"]
-- self.effect1 = uiMap["power_change_toast.content.vfx_ui_zhanli_b01"] -- self.effect1 = uiMap["power_change_toast.content.vfx_ui_zhanli_b01"]
-- self.effect2 = uiMap["power_change_toast.content.vfx_ui_zhanli_b03"] -- self.effect2 = uiMap["power_change_toast.content.vfx_ui_zhanli_b03"]
self:showEffect(false) self:showEffect(false)
self:showModuleUnlockAppearAnim() self:showModuleUnlockAppearAnim()
-- self.powerSpine:playAnim("idle", false, true) self.powerSpine:playAnim("idle", false, true)
end) end)
end end

View File

@ -10,9 +10,9 @@ function SummonRewardCell:init()
self.bg = uiMap["summon_reward_cell.bg"] self.bg = uiMap["summon_reward_cell.bg"]
self.bg1 = uiMap["summon_reward_cell.bg1"] self.bg1 = uiMap["summon_reward_cell.bg1"]
self.effectQlts = {} self.effectQlts = {}
self.effectQlts[2] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_lan_b01"] self.effectQlts[3] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_lan_b01"]
self.effectQlts[3] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_zi_b01"] self.effectQlts[4] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_zi_b01"]
self.effectQlts[4] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_cheng_b01"] self.effectQlts[5] = uiMap["summon_reward_cell.bg1.vfx_b13_chouka_cheng_b01"]
end end
function SummonRewardCell:getEffectQlts() function SummonRewardCell:getEffectQlts()
return self.effectQlts return self.effectQlts
@ -22,9 +22,9 @@ function SummonRewardCell:refresh(reward, index, parentUI)
if self.effectQlts[5] then if self.effectQlts[5] then
self.effectQlts[5]:setActive(false) self.effectQlts[5]:setActive(false)
end end
self.effectQlts[5]:setActive(false)
self.effectQlts[4]:setActive(false) self.effectQlts[4]:setActive(false)
self.effectQlts[3]:setActive(false) self.effectQlts[3]:setActive(false)
self.effectQlts[2]:setActive(false)
local cfg = DataManager.HeroData:getHeroConfig(reward.item.id) local cfg = DataManager.HeroData:getHeroConfig(reward.item.id)
self.imgIcon:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, tostring(cfg.icon)) self.imgIcon:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, tostring(cfg.icon))
self.bg:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, "summon_card_b_" .. cfg.qlt) self.bg:setSprite(GConst.ATLAS_PATH.ICON_HERO_SUMMON, "summon_card_b_" .. cfg.qlt)
@ -38,7 +38,7 @@ function SummonRewardCell:refresh(reward, index, parentUI)
end, 0.3) end, 0.3)
end end
function SummonRewardCell:playEffect(qlt) function SummonRewardCell:playEffect(qlt)
if qlt == 5 and self.effectQlts[5] == nil then if qlt == 6 and self.effectQlts[6] == nil then
local tranInfo = self.imgIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.TRANSFORM).parent local tranInfo = self.imgIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.TRANSFORM).parent
if tranInfo then if tranInfo then
local infoBase = UIPrefabObject:create() local infoBase = UIPrefabObject:create()
@ -46,11 +46,11 @@ function SummonRewardCell:playEffect(qlt)
infoBase:initPrefabHelper() infoBase:initPrefabHelper()
EffectManager:loadUIEffectAsync("assets/prefabs/effects/ui/vfx_b13_chouka_hong_b01.prefab", self.patentUI, infoBase, 0, EffectManager:loadUIEffectAsync("assets/prefabs/effects/ui/vfx_b13_chouka_hong_b01.prefab", self.patentUI, infoBase, 0,
function(obj) function(obj)
if self.effectQlts[5] then if self.effectQlts[6] then
self.effectQlts[5]:destroy() self.effectQlts[6]:destroy()
self.effectQlts[5] = nil self.effectQlts[6] = nil
end end
self.effectQlts[5] = obj self.effectQlts[6] = obj
end) end)
end end
else else