mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Move track to MusicController, compiles
This commit is contained in:
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user