mirror of
https://github.com/osukey/osukey.git
synced 2025-05-20 21:17:32 +09:00
Make mods argument optional for storyboard construction
This commit is contained in:
parent
b0688cc6dd
commit
c38126ba9d
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@ -60,10 +61,10 @@ namespace osu.Game.Storyboards.Drawables
|
|||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
||||||
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
public DrawableStoryboard(Storyboard storyboard, IReadOnlyList<Mod> mods)
|
public DrawableStoryboard(Storyboard storyboard, IReadOnlyList<Mod> mods = null)
|
||||||
{
|
{
|
||||||
Storyboard = storyboard;
|
Storyboard = storyboard;
|
||||||
Mods = mods;
|
Mods = mods ?? Array.Empty<Mod>();
|
||||||
|
|
||||||
Size = new Vector2(640, 480);
|
Size = new Vector2(640, 480);
|
||||||
|
|
||||||
|
@ -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);
|
new DrawableStoryboard(this, mods);
|
||||||
|
|
||||||
public Drawable CreateSpriteFromResourcePath(string path, TextureStore textureStore)
|
public Drawable CreateSpriteFromResourcePath(string path, TextureStore textureStore)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user