mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 03:42:57 +08:00
Fix GameplayState
not handled as nullable
This commit is contained in:
parent
4b0b0735a8
commit
dac8f98ea6
@ -54,14 +54,14 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(GameplayState gameplayState)
|
||||
private void load([CanBeNull] GameplayState gameplayState)
|
||||
{
|
||||
new BarLineGenerator<BarLine>(Beatmap).BarLines.ForEach(bar => Playfield.Add(bar));
|
||||
|
||||
var spriteElements = gameplayState.Storyboard.Layers.Where(l => l.Name != @"Overlay")
|
||||
var spriteElements = gameplayState?.Storyboard.Layers.Where(l => l.Name != @"Overlay")
|
||||
.SelectMany(l => l.Elements)
|
||||
.OfType<StoryboardSprite>()
|
||||
.DistinctBy(e => e.Path);
|
||||
.DistinctBy(e => e.Path) ?? Enumerable.Empty<StoryboardSprite>();
|
||||
|
||||
if (spriteElements.Count() < 10)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user