2025-01-04 23:00:19 +08:00

20 lines
754 B
Lua

---@class WB_HeadingInfo_C:UUserWidget
---@field TextBlock_Dead UTextBlock
---@field TextBlock_Kill UTextBlock
--Edit Below--
---@type WB_HeadingInfo_C
local WB_HeadingInfo = { bInitDoOnce = false; };
function WB_HeadingInfo:Construct()
UGCEventSystem.AddListener(EventEnum.UpdatePlayerScoreData, self.UpdatePlayerScoreData, self)
end
function WB_HeadingInfo:UpdatePlayerScoreData()
local LocalPK = UGCSystemLibrary.GetLocalPlayerKey()
self.TextBlock_Dead:SetText(tostring(PlayerScoreSystem.GetPlayerScoreDataFromType(LocalPK, PlayerScoreSystem.Config.EScoreType.Deaths)))
self.TextBlock_Kill:SetText(tostring(PlayerScoreSystem.GetPlayerScoreDataFromType(LocalPK, PlayerScoreSystem.Config.EScoreType.Kills)))
end
return WB_HeadingInfo;