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

Make mods argument optional for storyboard construction

This commit is contained in:
Dean Herbert 2022-03-04 12:05:02 +09:00
parent b0688cc6dd
commit c38126ba9d
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
@ -60,10 +61,10 @@ namespace osu.Game.Storyboards.Drawables
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
public DrawableStoryboard(Storyboard storyboard, IReadOnlyList<Mod> mods)
public DrawableStoryboard(Storyboard storyboard, IReadOnlyList<Mod> mods = null)
{
Storyboard = storyboard;
Mods = mods;
Mods = mods ?? Array.Empty<Mod>();
Size = new Vector2(640, 480);

View File

@ -91,7 +91,7 @@ namespace osu.Game.Storyboards
}
}
public DrawableStoryboard CreateDrawable(IReadOnlyList<Mod> mods) =>
public DrawableStoryboard CreateDrawable(IReadOnlyList<Mod> mods = null) =>
new DrawableStoryboard(this, mods);
public Drawable CreateSpriteFromResourcePath(string path, TextureStore textureStore)