Make Beatmaps parsable as skins

This commit is contained in:
Dean Herbert
2018-03-14 20:45:04 +09:00
parent 553fd3b789
commit dbcf755618
7 changed files with 105 additions and 12 deletions

View File

@ -10,6 +10,7 @@ using osu.Framework.IO.Stores;
using osu.Framework.Logging;
using osu.Game.Beatmaps.Formats;
using osu.Game.Graphics.Textures;
using osu.Game.Skinning;
using osu.Game.Storyboards;
namespace osu.Game.Beatmaps
@ -100,6 +101,23 @@ namespace osu.Game.Beatmaps
return storyboard;
}
protected override Skin GetSkin()
{
Skin skin;
try
{
// todo: this needs an AudioManager
skin = new BeatmapSkin(BeatmapInfo, store);
}
catch (Exception e)
{
Logger.Error(e, "Skin failed to load");
skin = new DefaultSkin();
}
return skin;
}
}
}
}