30 lines
1.0 KiB
Lua
30 lines
1.0 KiB
Lua
---@class WB_PlayerHead_C:UUserWidget
|
|
---@field Common_Avatar_BP_C_0 UCommon_Avatar_BP_C
|
|
--Edit Below--
|
|
local WB_PlayerHead = { bInitDoOnce = false }
|
|
|
|
--[==[ Construct
|
|
function WB_PlayerHead:Construct()
|
|
|
|
end
|
|
-- Construct ]==]
|
|
|
|
-- function WB_PlayerHead:Tick(MyGeometry, InDeltaTime)
|
|
|
|
-- end
|
|
|
|
-- function WB_PlayerHead:Destruct()
|
|
|
|
-- end
|
|
|
|
function WB_PlayerHead:UpdatePlayerInfo(PlayerKey)
|
|
if self.PlayerKey ~= PlayerKey then
|
|
self.PlayerKey = PlayerKey
|
|
local PlayerInfo = UGCGameSystem.GameState:GetPlayerHeadInfo(PlayerKey)
|
|
---@param PlayerInfo table {UID:string, IconURL:string, Gender:int, AvatarBoxId:int, PlayerLevel:int, PlayerName:string} 其中AvatarBoxId可以从PlayerState中获取
|
|
---@field InitView:fun(style:int32,uid:FString,iconURL:FString,gender:int32,frameLevel:int32,playerLevel:int32,ignoreFrame:bool,IsMySelf:bool)
|
|
self.Common_Avatar_BP_C_0:InitView(2, PlayerInfo.UIDString, PlayerInfo.IconURL, PlayerInfo.Gender, PlayerInfo.AvatarBoxId, PlayerInfo.PlayerLevel, false, false)
|
|
end
|
|
end
|
|
|
|
return WB_PlayerHead |