PGRData/Script/matrix/xui/xuispecialtrainsnow/XUiGridFubenSnowGameMedal.lua
2024-09-01 22:49:41 +02:00

21 lines
No EOL
826 B
Lua

---@class XUiGridFubenSnowGameMedal
local XUiGridFubenSnowGameMedal = XClass(nil,"XUiGridFubenSnowGameMedal")
function XUiGridFubenSnowGameMedal:Refresh(id, curRankId)
--段位图标
local icon = XFubenSpecialTrainConfig.GetRankIconById(id)
self.RankIcon:SetSprite(icon)
--段位名称
self.TierName.text = XFubenSpecialTrainConfig.GetRankTierNameById(id)
--当前段位奖杯数
local IsLowestGrade = XFubenSpecialTrainConfig.CheckLowestGrade(id)
self.RankStar.gameObject:SetActiveEx(not IsLowestGrade)
if IsLowestGrade then
self.Score.text = XFubenSpecialTrainConfig.GetRankTierDescribeById(id)
else
self.Score.text = XFubenSpecialTrainConfig.GetRankScoreById(id)
end
self.BgSelect.gameObject:SetActiveEx(id == curRankId)
end
return XUiGridFubenSnowGameMedal