1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 15:12:57 +08:00
This commit is contained in:
EVAST9919 2017-05-10 03:45:31 +03:00
parent 113df86304
commit 7b17e331c4

View File

@ -33,14 +33,7 @@ namespace osu.Game.Screens.Play
public Action<double> OnSeek;
private IClock audioClock;
public IClock AudioClock
{
set
{
audioClock = value;
info.AudioClock = value;
}
}
public IClock AudioClock { set { audioClock = info.AudioClock = value; } }
private double lastHitTime => ((objects.Last() as IHasEndTime)?.EndTime ?? objects.Last().StartTime) + 1;
@ -150,9 +143,9 @@ namespace osu.Game.Screens.Play
if (objects == null)
return;
float progress = (float)(((audioClock?.CurrentTime ?? Time.Current) - firstHitTime) / (lastHitTime - firstHitTime));
double progress = ((audioClock?.CurrentTime ?? Time.Current) - firstHitTime) / (lastHitTime - firstHitTime);
bar.UpdatePosition(progress);
bar.UpdatePosition((float)progress);
graph.Progress = (int)(graph.ColumnCount * progress);
}
}