【跨服战】尝试修复打开跨服战报错

gaoxin 2022-01-15 07:36:48 +08:00
parent a30aa0df10
commit db279baaf7
1 changed files with 8 additions and 3 deletions

View File

@ -151,9 +151,14 @@ function JumpServerPanel:UpdateCarbonContent()
local live = Util.GetGameObject(v, "bg/carbon/Live")
local name = Util.GetGameObject(v, "bg/carbon/Name")
local timeReset = Util.GetGameObject(v, "bg/InfoBg/timeReset")
live:GetComponent("Image").sprite = self.spLoader:LoadSprite(data.live)
live:GetComponent("RectTransform").localPosition = data.livePos
live:GetComponent("RectTransform").sizeDelta = data.liveSize
if data.live and data.live ~= "" then
live:GetComponent("Image").sprite = self.spLoader:LoadSprite(data.live)
live:GetComponent("RectTransform").localPosition = data.livePos
live:GetComponent("RectTransform").sizeDelta = data.liveSize
live:SetActive(true)
else
live:SetActive(false)
end
name:GetComponent("Image").sprite = self.spLoader:LoadSprite(data.name)
timeReset:GetComponent("Text").text = string.format(data.resetTime)
self:SystemState(data.id,function()