进度条修改
parent
08f87f8623
commit
20e70dfffb
|
|
@ -75,7 +75,7 @@ function WorldArenaUpRewardPanel:OnOpen(data)
|
|||
this.rankName.text=rankData.RankName
|
||||
this.scoreTxt.text=lastScore.."/"..rankData.ScoreUp
|
||||
this.progress.fillAmount=(lastScore-minScore)/(maxScore-minScore)
|
||||
currRank=rankData.RankGrade
|
||||
--currRank=rankData.RankGrade
|
||||
this.SetStarShow(rankData.RankLevel,rankData.RankGrade,self.sortingOrder)
|
||||
this.StartProgressChange(function()
|
||||
local callList2 = Stack.New()
|
||||
|
|
@ -181,6 +181,7 @@ end
|
|||
local num=0
|
||||
--走的条数
|
||||
local walkNum=0
|
||||
local changeNum=1
|
||||
--开始进度条滚动
|
||||
function this.StartProgressChange(func)
|
||||
if this.TimeCounter then
|
||||
|
|
@ -188,17 +189,17 @@ function this.StartProgressChange(func)
|
|||
end
|
||||
|
||||
local function _TimeUpdate()
|
||||
local changeNum=1
|
||||
|
||||
--降低
|
||||
if lastScore<currScore then
|
||||
if currScore-maxScore>10 then
|
||||
if maxScore-lastScore>10 and lastScore-currScore>10 then
|
||||
changeNum=8
|
||||
else
|
||||
changeNum=1
|
||||
end
|
||||
lastScore=lastScore+changeNum
|
||||
--经验条走到头
|
||||
if lastScore==maxScore+1 then
|
||||
if lastScore==maxScore then
|
||||
walkNum=walkNum+1
|
||||
if RankConfig[lastRankId+1] then
|
||||
lastRankId=lastRankId+1
|
||||
|
|
@ -209,13 +210,13 @@ function this.StartProgressChange(func)
|
|||
end
|
||||
end
|
||||
else
|
||||
if lastScore-minScore>10 then
|
||||
if lastScore-minScore>10 and lastScore-currScore>10 then
|
||||
changeNum=8
|
||||
else
|
||||
changeNum=1
|
||||
end
|
||||
lastScore=lastScore-changeNum
|
||||
if lastScore==minScore-1 then
|
||||
if lastScore==minScore then
|
||||
walkNum=walkNum+1
|
||||
if RankConfig[lastRankId-1] then
|
||||
lastRankId=lastRankId-1
|
||||
|
|
@ -247,7 +248,6 @@ end
|
|||
|
||||
function this:OnClose()
|
||||
WorldArenaManager.ClearReward()
|
||||
LogError("调用关闭界面方法 "..newResore)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."yuxulundaoScore",newResore)
|
||||
if this.TimeCounter then
|
||||
this.TimeCounter:Stop()
|
||||
|
|
|
|||
Loading…
Reference in New Issue