mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Give the test case clock an accurate IsRunning value
This commit is contained in:
@ -45,7 +45,26 @@ namespace osu.Game.Tests.Visual
|
||||
beatmapChanged(osuGame.Beatmap.Value);
|
||||
}
|
||||
|
||||
private void beatmapChanged(WorkingBeatmap working) => Clock.ControlPointInfo = working.Beatmap.ControlPointInfo;
|
||||
private void beatmapChanged(WorkingBeatmap working)
|
||||
{
|
||||
Clock.ControlPointInfo = working.Beatmap.ControlPointInfo;
|
||||
Clock.ChangeSource((IAdjustableClock)working.Track ?? new StopwatchClock());
|
||||
Clock.ProcessFrame();
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
// We don't have any explicit way to start/stop the track, but want a relatively accurate IsRunning state
|
||||
// The track's IsRunning state is used to determine our clock's IsRunning state
|
||||
if (osuGame.Beatmap.Value.Track.IsRunning)
|
||||
Clock.Start();
|
||||
else
|
||||
Clock.Stop();
|
||||
|
||||
Clock.ProcessFrame();
|
||||
}
|
||||
|
||||
protected override bool OnWheel(InputState state)
|
||||
{
|
||||
|
Reference in New Issue
Block a user