Use metadata field of WorkingBeatmap.

This commit is contained in:
Huo Yaoyuan
2017-05-06 14:03:08 +08:00
parent 4f49151984
commit 146d57953d
6 changed files with 15 additions and 19 deletions

View File

@ -51,13 +51,13 @@ namespace osu.Game.Database
protected override Texture GetBackground()
{
if (BeatmapInfo?.Metadata?.BackgroundFile == null)
if (Metadata?.BackgroundFile == null)
return null;
try
{
using (var reader = getReader())
return new TextureStore(new RawTextureLoaderStore(reader), false).Get(BeatmapInfo.Metadata.BackgroundFile);
return new TextureStore(new RawTextureLoaderStore(reader), false).Get(Metadata.BackgroundFile);
}
catch { return null; }
}
@ -66,7 +66,7 @@ namespace osu.Game.Database
{
try
{
var trackData = getReader()?.GetStream(BeatmapInfo.Metadata.AudioFile);
var trackData = getReader()?.GetStream(Metadata.AudioFile);
return trackData == null ? null : new TrackBass(trackData);
}
catch { return null; }