档位奖励进度显示fix
This commit is contained in:
parent
ef77d515f2
commit
de49d604ad
@ -110,13 +110,14 @@ function ArenaGradingRewardCell:refresh(id)
|
|||||||
local posY = rootHeight * curProg
|
local posY = rootHeight * curProg
|
||||||
|
|
||||||
-- 高度超框处理
|
-- 高度超框处理
|
||||||
if self.id == 1 or self.id == #table.keys(cfg) then
|
if self.id == 1 or self.id == #DataManager.ArenaData:getGradingRewardCfg() then
|
||||||
local tagHeight = self.tagProg:fastGetSizeDeltaY()
|
local tagHeight = self.tagProg:fastGetSizeDeltaY()
|
||||||
if posY < tagHeight / 2 then
|
if posY < tagHeight / 2 then
|
||||||
posY = tagHeight / 2
|
posY = tagHeight / 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.tagProg:setAnchoredPositionY(posY)
|
self.tagProg:setAnchoredPositionY(posY)
|
||||||
|
self.baseObject:getTransform():SetAsLastSibling()
|
||||||
else
|
else
|
||||||
self.tagProg:setVisible(false)
|
self.tagProg:setVisible(false)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -568,11 +568,8 @@ function ArenaData:getGradingRewardProgressByScore(id, score)
|
|||||||
|
|
||||||
if id == 1 then
|
if id == 1 then
|
||||||
-- 第一个档位特殊处理
|
-- 第一个档位特殊处理
|
||||||
local minScore = self:getSeasonGradingMinScore()
|
local prog = 0.5
|
||||||
local prog = (score - minScore) / (point - minScore)
|
|
||||||
if prog > 0.5 then
|
|
||||||
prog = 0.5
|
|
||||||
end
|
|
||||||
if score > point then
|
if score > point then
|
||||||
prog = prog + ((score - point) / (rangeMax - point))
|
prog = prog + ((score - point) / (rangeMax - point))
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user