Merge pull request #4484 from nyquillerium/storyboard-clock

Fix storyboards not having the correct gameplay clock
This commit is contained in:
Dean Herbert 2019-03-18 21:26:37 +09:00 committed by GitHub
commit 4031cad4f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -7,6 +7,7 @@
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Textures;
using osu.Game.IO;
using osu.Game.Screens.Play;
namespace osu.Game.Storyboards.Drawables
{
@ -55,9 +56,12 @@ public DrawableStoryboard(Storyboard storyboard)
});
}
[BackgroundDependencyLoader]
private void load(FileStore fileStore)
[BackgroundDependencyLoader(true)]
private void load(FileStore fileStore, GameplayClock clock)
{
if (clock != null)
Clock = clock;
dependencies.Cache(new TextureStore(new TextureLoaderStore(fileStore.Store), false, scaleAdjust: 1));
foreach (var layer in Storyboard.Layers)