forked from endernon/PGRData
21 lines
No EOL
695 B
Lua
21 lines
No EOL
695 B
Lua
local XUiGridAutoFightMember = XClass(nil, "XUiGridAutoFightMember")
|
|
|
|
function XUiGridAutoFightMember:Ctor(ui)
|
|
self.GameObject = ui.gameObject
|
|
self.Transform = ui.transform
|
|
|
|
XTool.InitUiObject(self)
|
|
end
|
|
|
|
function XUiGridAutoFightMember:UpdateMember(characterId, isLock)
|
|
local isExistChar = characterId ~= nil and characterId ~= 0
|
|
self.GameObject:SetActiveEx(isExistChar)
|
|
|
|
if isExistChar then
|
|
self.RImgHead:SetRawImage(XDataCenter.CharacterManager.GetCharRoundnessHeadIcon(characterId))
|
|
self.TxtNickName.text = XCharacterConfigs.GetCharacterFullNameStr(characterId)
|
|
end
|
|
self.TxtLock.gameObject:SetActiveEx(isLock)
|
|
end
|
|
|
|
return XUiGridAutoFightMember |