30 lines
776 B
Lua
30 lines
776 B
Lua
---@class WB_TaskReward_C:UUserWidget
|
|
---@field TextBlock_Count UTextBlock
|
|
---@field WidgetSwitcher_RewardType UWidgetSwitcher
|
|
--Edit Below--
|
|
local WB_TaskReward_N = { bInitDoOnce = false; };
|
|
|
|
--[==[ Construct
|
|
function WB_TaskReward_N:Construct()
|
|
|
|
end
|
|
-- Construct ]==]
|
|
|
|
-- function WB_TaskReward_N:Tick(MyGeometry, InDeltaTime)
|
|
|
|
-- end
|
|
|
|
-- function WB_TaskReward_N:Destruct()
|
|
|
|
-- end
|
|
|
|
function WB_TaskReward_N:Init(RewardType, Count)
|
|
self.TextBlock_Count:SetText(tostring(Count))
|
|
if RewardType == ArchiveDataConfig.EArchiveType.Exp then
|
|
self.WidgetSwitcher_RewardType:SetActiveWidgetIndex(1)
|
|
elseif RewardType == ArchiveDataConfig.EArchiveType.Gold then
|
|
self.WidgetSwitcher_RewardType:SetActiveWidgetIndex(0)
|
|
end
|
|
end
|
|
|
|
return WB_TaskReward_N; |