mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
Fixed update condition
This commit is contained in:
parent
c0acc1799b
commit
ea0add2354
@ -145,7 +145,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
double progress = ((audioClock?.CurrentTime ?? Time.Current) - firstHitTime) / (lastHitTime - firstHitTime);
|
||||
|
||||
if((int)progress * 100 < 100)
|
||||
if(progress < 1)
|
||||
{
|
||||
bar.UpdatePosition((float)progress);
|
||||
graph.Progress = (int)(graph.ColumnCount * progress);
|
||||
|
@ -74,8 +74,9 @@ namespace osu.Game.Screens.Play
|
||||
base.Update();
|
||||
|
||||
double songCurrentTime = AudioClock.CurrentTime - startTime;
|
||||
int currentPercent = (int)(songCurrentTime / (endTime - startTime) * 100);
|
||||
|
||||
if(songCurrentTime < endTime - startTime)
|
||||
if (currentPercent <= 100)
|
||||
{
|
||||
int currentSecond = TimeSpan.FromMilliseconds(songCurrentTime).Seconds;
|
||||
|
||||
@ -92,8 +93,6 @@ namespace osu.Game.Screens.Play
|
||||
timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(endTime - AudioClock.CurrentTime).ToString(@"m\:ss");
|
||||
}
|
||||
|
||||
int currentPercent = (int)(songCurrentTime / (endTime - startTime) * 100) + 1;
|
||||
|
||||
if (currentPercent != previousPercent)
|
||||
{
|
||||
previousPercent = currentPercent;
|
||||
|
Loading…
Reference in New Issue
Block a user