diff --git a/osu.Game/Screens/Play/FailAnimation.cs b/osu.Game/Screens/Play/FailAnimationContainer.cs similarity index 97% rename from osu.Game/Screens/Play/FailAnimation.cs rename to osu.Game/Screens/Play/FailAnimationContainer.cs index 57bdad079eee..821c67e3cba5 100644 --- a/osu.Game/Screens/Play/FailAnimation.cs +++ b/osu.Game/Screens/Play/FailAnimationContainer.cs @@ -27,10 +27,10 @@ namespace osu.Game.Screens.Play { /// - /// Manage the animation to be applied when a player fails. + /// Manage the animation to be applied when a player fails. Applies the animation to children. /// Single use and automatically disposed after use. /// - public partial class FailAnimation : Container + public partial class FailAnimationContainer : Container { public Action? OnComplete; @@ -66,7 +66,7 @@ public partial class FailAnimation : Container /// public BackgroundScreen? Background { private get; set; } - public FailAnimation(DrawableRuleset drawableRuleset) + public FailAnimationContainer(DrawableRuleset drawableRuleset) { this.drawableRuleset = drawableRuleset; diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 60806a73c5ed..ac9ce11cb536 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -257,7 +257,7 @@ private void load(OsuConfigManager config, OsuGameBase game, CancellationToken c rulesetSkinProvider.AddRange(new Drawable[] { - failAnimationLayer = new FailAnimation(DrawableRuleset) + failAnimationContainer = new FailAnimationContainer(DrawableRuleset) { OnComplete = onFailComplete, Children = new[] @@ -310,7 +310,7 @@ private void load(OsuConfigManager config, OsuGameBase game, CancellationToken c // 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. - failAnimationLayer.Add(createOverlayComponents(Beatmap.Value)); + failAnimationContainer.Add(createOverlayComponents(Beatmap.Value)); if (!DrawableRuleset.AllowGameplayOverlays) { @@ -587,7 +587,7 @@ protected void PerformExit(bool showDialogFirst) // if the fail animation is currently in progress, accelerate it (it will show the pause dialog on completion). if (ValidForResume && GameplayState.HasFailed) { - failAnimationLayer.FinishTransforms(true); + failAnimationContainer.FinishTransforms(true); return; } @@ -888,7 +888,7 @@ private void updateLeaderboardExpandedState() => protected FailOverlay FailOverlay { get; private set; } - private FailAnimation failAnimationLayer; + private FailAnimationContainer failAnimationContainer; private bool onFail() { @@ -913,7 +913,7 @@ private bool onFail() if (PauseOverlay.State.Value == Visibility.Visible) PauseOverlay.Hide(); - failAnimationLayer.Start(); + failAnimationContainer.Start(); if (GameplayState.Mods.OfType().Any(m => m.RestartOnFail)) Restart(true); @@ -1044,7 +1044,7 @@ public override void OnEntering(ScreenTransitionEvent e) b.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground); - failAnimationLayer.Background = b; + failAnimationContainer.Background = b; }); HUDOverlay.IsPlaying.BindTo(localUserPlaying); @@ -1099,7 +1099,7 @@ public override bool OnExiting(ScreenExitEvent e) screenSuspension?.RemoveAndDisposeImmediately(); // Eagerly clean these up as disposal of child components is asynchronous and may leave sounds playing beyond user expectations. - failAnimationLayer?.Stop(); + failAnimationContainer?.Stop(); PauseOverlay?.StopAllSamples(); if (LoadedBeatmapSuccessfully)