1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

use created storyboard to check for drawables instead

This commit is contained in:
Nathan Alo 2021-06-03 13:56:14 +08:00
parent 62b07fb9ce
commit d7d0dde5d2

View File

@ -22,16 +22,17 @@ namespace osu.Game.Graphics.Backgrounds
[BackgroundDependencyLoader]
private void load()
{
if (!Beatmap.Storyboard.HasDrawable)
return;
var storyboard = new Storyboard { BeatmapInfo = Beatmap.BeatmapInfo };
foreach (var layer in storyboard.Layers)
{
if (layer.Name != "Fail")
layer.Elements = Beatmap.Storyboard.GetLayer(layer.Name).Elements.Where(e => !(e is StoryboardSampleInfo)).ToList();
}
if (!storyboard.HasDrawable)
return;
if (storyboard.ReplacesBackground)
{
Sprite.Texture = Texture.WhitePixel;