Move track to MusicController, compiles

This commit is contained in:
smoogipoo
2020-08-04 21:53:00 +09:00
parent 641279ec3e
commit 6e42b8219c
57 changed files with 438 additions and 346 deletions

View File

@ -27,8 +27,6 @@ namespace osu.Game.Tests.Beatmaps
this.storyboard = storyboard;
}
public override bool TrackLoaded => true;
public override bool BeatmapLoaded => true;
protected override IBeatmap GetBeatmap() => beatmap;

View File

@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual
private void beatmapChanged(ValueChangedEvent<WorkingBeatmap> e)
{
Clock.ControlPointInfo = e.NewValue.Beatmap.ControlPointInfo;
Clock.ChangeSource((IAdjustableClock)e.NewValue.Track ?? new StopwatchClock());
Clock.ChangeSource(MusicController.GetTrackClock() ?? new StopwatchClock());
Clock.ProcessFrame();
}

View File

@ -20,6 +20,7 @@ using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Database;
using osu.Game.Online.API;
using osu.Game.Overlays;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.UI;
@ -135,6 +136,9 @@ namespace osu.Game.Tests.Visual
[Resolved]
protected AudioManager Audio { get; private set; }
[Resolved]
protected MusicController MusicController { get; private set; }
/// <summary>
/// Creates the ruleset to be used for this test scene.
/// </summary>
@ -164,8 +168,8 @@ namespace osu.Game.Tests.Visual
rulesetDependencies?.Dispose();
if (Beatmap?.Value.TrackLoaded == true)
Beatmap.Value.Track.Stop();
if (MusicController?.TrackLoaded == true)
MusicController.Stop();
if (contextFactory.IsValueCreated)
contextFactory.Value.ResetDatabase();

View File

@ -13,7 +13,7 @@ namespace osu.Game.Tests.Visual
base.Update();
// note that this will override any mod rate application
Beatmap.Value.Track.Tempo.Value = Clock.Rate;
MusicController.Tempo.Value = Clock.Rate;
}
}
}