PGRData/Resources/Scripts/XUi/XUiSpringFestival/SmashEggs/XUiGridSpringFestivalBuffEffectItem.lua
2022-12-26 14:06:01 +05:30

18 lines
No EOL
577 B
Lua

local XUiGridSpringFestivalBuffEffectItem = XClass(nil, "XUiGridSpringFestivalBuffEffectItem")
function XUiGridSpringFestivalBuffEffectItem:Ctor(ui)
self.GameObject = ui.gameObject
self.Transform = ui
XTool.InitUiObject(self)
end
function XUiGridSpringFestivalBuffEffectItem:Refresh(itemId)
self.GameObject:SetActiveEx(itemId > 0)
if itemId == 0 then return end
local desc = XSpringFestivalActivityConfigs.GetBuffItemDesc(itemId)
if self.TxtDescribe then
self.TxtDescribe.text = desc
end
end
return XUiGridSpringFestivalBuffEffectItem