PGRData/Script/matrix/xui/xuifubenroguelike/XUiGridHelpRoleItem.lua

20 lines
659 B
Lua
Raw Normal View History

local XUiGridHelpRoleItem = XClass(nil, "XUiGridHelpRoleItem")
function XUiGridHelpRoleItem:Ctor(ui, rootUi)
self.GameObject = ui.gameObject
self.Transform = ui.transform
self.RootUi = rootUi
XTool.InitUiObject(self)
end
function XUiGridHelpRoleItem:UpdateHelpRoleInfo(robotId)
local characterId = XRobotManager.GetCharacterId(robotId)
self.RImgRole:SetRawImage(XDataCenter.CharacterManager.GetCharHalfBodyImage(characterId))
self.TxtName.text = XCharacterConfigs.GetCharacterFullNameStr(characterId)
self.ImgNew.gameObject:SetActiveEx(XDataCenter.FubenRogueLikeManager.IsRobotNew(robotId))
end
return XUiGridHelpRoleItem