mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:12:57 +08:00
cleanups
This commit is contained in:
parent
113df86304
commit
7b17e331c4
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user