Privatise the OsuGame beatmap, add local beatmap to OsuTestCase

This commit is contained in:
smoogipoo
2018-05-23 17:37:39 +09:00
parent 6c0c932c48
commit 8004b8af4d
51 changed files with 279 additions and 277 deletions

View File

@ -65,7 +65,7 @@ namespace osu.Game
protected override Container<Drawable> Content => content;
public IBindable<WorkingBeatmap> Beatmap { get; private set; }
protected GameBeatmap Beatmap;
private WorkingBeatmap lastBeatmap;
private Bindable<bool> fpsDisplayVisible;
@ -158,7 +158,7 @@ namespace osu.Game
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Venera-Light"));
var defaultBeatmap = new DummyWorkingBeatmap(this);
Beatmap = new NonNullableBindable<WorkingBeatmap>(defaultBeatmap);
Beatmap = new GameBeatmap(defaultBeatmap);
BeatmapManager.DefaultBeatmap = defaultBeatmap;
// tracks play so loud our samples can't keep up.
@ -186,6 +186,9 @@ namespace osu.Game
lastBeatmap = b;
};
dependencies.Cache(Beatmap);
dependencies.CacheAs<IGameBeatmap>(Beatmap);
FileStore.Cleanup();
AddInternal(api);