ro-table/Assets/Resources/Script/FrameWork/GUI/cell/TutorTaskRewardCell.txt
2025-06-04 05:12:01 +08:00

24 lines
531 B
Plaintext

local baseCell = autoImport("BaseCell")
TutorTaskRewardCell = class("TutorTaskRewardCell", baseCell)
function TutorTaskRewardCell:Init()
self:FindObjs()
end
function TutorTaskRewardCell:FindObjs()
self.icon = self:FindGO("Icon"):GetComponent(UISprite)
self.num = self:FindGO("Num"):GetComponent(UILabel)
end
function TutorTaskRewardCell:SetData(data)
self.data = data
if data then
local item = Table_Item[data.id]
if item then
IconManager:SetItemIcon(item.Icon, self.icon)
end
self.num.text = data.num
end
end