mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Fix incorrect nesting
This commit is contained in:
@ -230,17 +230,32 @@ namespace osu.Game.Screens.Play
|
||||
// this is intentionally done in two stages to ensure things are in a loaded state before exposing the ruleset to skin sources.
|
||||
GameplayClockContainer.Add(rulesetSkinProvider);
|
||||
|
||||
rulesetSkinProvider.AddRange(new[]
|
||||
rulesetSkinProvider.AddRange(new Drawable[]
|
||||
{
|
||||
failAnimationLayer = new FailAnimation(DrawableRuleset)
|
||||
{
|
||||
OnComplete = onFailComplete,
|
||||
Children = new[]
|
||||
{
|
||||
// underlay and gameplay should have access to the skinning sources.
|
||||
createUnderlayComponents(),
|
||||
createGameplayComponents(Beatmap.Value, playableBeatmap)
|
||||
}
|
||||
},
|
||||
FailOverlay = new FailOverlay
|
||||
{
|
||||
OnRetry = Restart,
|
||||
OnQuit = () => PerformExit(true),
|
||||
}
|
||||
});
|
||||
|
||||
// add the overlay components as a separate step as they proxy some elements from the above underlay/gameplay components.
|
||||
// also give the overlays the ruleset skin provider to allow rulesets to potentially override HUD elements (used to disable combo counters etc.)
|
||||
// we may want to limit this in the future to disallow rulesets from outright replacing elements the user expects to be there.
|
||||
rulesetSkinProvider.Add(createOverlayComponents(Beatmap.Value));
|
||||
failAnimationLayer.AddRange(new[]
|
||||
{
|
||||
createOverlayComponents(Beatmap.Value),
|
||||
});
|
||||
|
||||
if (!DrawableRuleset.AllowGameplayOverlays)
|
||||
{
|
||||
@ -339,7 +354,7 @@ namespace osu.Game.Screens.Play
|
||||
var container = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
Children = new[]
|
||||
{
|
||||
new HotkeyExitOverlay
|
||||
{
|
||||
@ -351,11 +366,6 @@ namespace osu.Game.Screens.Play
|
||||
PerformExit(false);
|
||||
},
|
||||
},
|
||||
failAnimation = new FailAnimation(DrawableRuleset)
|
||||
{
|
||||
OnComplete = onFailComplete,
|
||||
Children = new[]
|
||||
{
|
||||
DimmableStoryboard.OverlayLayerContainer.CreateProxy(),
|
||||
BreakOverlay = new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
|
||||
{
|
||||
@ -397,14 +407,7 @@ namespace osu.Game.Screens.Play
|
||||
OnRetry = Restart,
|
||||
OnQuit = () => PerformExit(true),
|
||||
},
|
||||
}
|
||||
},
|
||||
FailOverlay = new FailOverlay
|
||||
{
|
||||
OnRetry = Restart,
|
||||
OnQuit = () => PerformExit(true),
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (!Configuration.AllowSkipping || !DrawableRuleset.AllowGameplayOverlays)
|
||||
@ -547,7 +550,7 @@ namespace osu.Game.Screens.Play
|
||||
// if the fail animation is currently in progress, accelerate it (it will show the pause dialog on completion).
|
||||
if (ValidForResume && HasFailed)
|
||||
{
|
||||
failAnimation.FinishTransforms(true);
|
||||
failAnimationLayer.FinishTransforms(true);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -772,7 +775,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
protected FailOverlay FailOverlay { get; private set; }
|
||||
|
||||
private FailAnimation failAnimation;
|
||||
private FailAnimation failAnimationLayer;
|
||||
|
||||
private bool onFail()
|
||||
{
|
||||
@ -788,7 +791,7 @@ namespace osu.Game.Screens.Play
|
||||
if (PauseOverlay.State.Value == Visibility.Visible)
|
||||
PauseOverlay.Hide();
|
||||
|
||||
failAnimation.Start();
|
||||
failAnimationLayer.Start();
|
||||
|
||||
if (GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
|
||||
Restart();
|
||||
@ -962,7 +965,7 @@ namespace osu.Game.Screens.Play
|
||||
public override bool OnExiting(IScreen next)
|
||||
{
|
||||
screenSuspension?.RemoveAndDisposeImmediately();
|
||||
failAnimation?.RemoveAndDisposeImmediately();
|
||||
failAnimationLayer?.RemoveAndDisposeImmediately();
|
||||
|
||||
// if arriving here and the results screen preparation task hasn't run, it's safe to say the user has not completed the beatmap.
|
||||
if (prepareScoreForDisplayTask == null)
|
||||
|
Reference in New Issue
Block a user