mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Tidy up clock logic using DI and a GameplayClock
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
@ -40,13 +41,7 @@ namespace osu.Game.Screens.Play
|
||||
private readonly BreakInfo info;
|
||||
private readonly BreakArrows breakArrows;
|
||||
|
||||
public BreakOverlay(bool letterboxing, ScoreProcessor scoreProcessor)
|
||||
: this(letterboxing)
|
||||
{
|
||||
bindProcessor(scoreProcessor);
|
||||
}
|
||||
|
||||
public BreakOverlay(bool letterboxing)
|
||||
public BreakOverlay(bool letterboxing, ScoreProcessor scoreProcessor = null)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Child = fadeContainer = new Container
|
||||
@ -98,6 +93,14 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (scoreProcessor != null) bindProcessor(scoreProcessor);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(GameplayClock clock)
|
||||
{
|
||||
if (clock != null) Clock = clock;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
Reference in New Issue
Block a user