Centralise and update WorkingBeatmap creation in test cases

This commit is contained in:
Dean Herbert
2019-05-31 14:40:53 +09:00
parent 80d65f9a3b
commit f33a5bc54c
34 changed files with 278 additions and 250 deletions

View File

@ -195,7 +195,7 @@ namespace osu.Game
// this adds a global reduction of track volume for the time being.
Audio.Tracks.AddAdjustment(AdjustableProperty.Volume, new BindableDouble(0.8));
beatmap = new OsuBindableBeatmap(defaultBeatmap, Audio);
beatmap = new OsuBindableBeatmap(defaultBeatmap);
dependencies.CacheAs<IBindable<WorkingBeatmap>>(beatmap);
dependencies.CacheAs(beatmap);
@ -282,21 +282,9 @@ namespace osu.Game
private class OsuBindableBeatmap : BindableBeatmap
{
public OsuBindableBeatmap(WorkingBeatmap defaultValue)
: base(defaultValue, null)
: base(defaultValue)
{
}
public OsuBindableBeatmap(WorkingBeatmap defaultValue, AudioManager audioManager)
: base(defaultValue, audioManager)
{
}
public override BindableBeatmap GetBoundCopy()
{
var copy = new OsuBindableBeatmap(Default, AudioManager);
copy.BindTo(this);
return copy;
}
}
private class OsuUserInputManager : UserInputManager