1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Rename FailAnimation to FailAnimationContainer

This commit is contained in:
Dean Herbert 2023-10-08 00:39:30 +09:00
parent 7c7771afca
commit e5207167c8
No known key found for this signature in database
2 changed files with 10 additions and 10 deletions

View File

@ -27,10 +27,10 @@ using osuTK.Graphics;
namespace osu.Game.Screens.Play
{
/// <summary>
/// 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.
/// </summary>
public partial class FailAnimation : Container
public partial class FailAnimationContainer : Container
{
public Action? OnComplete;
@ -66,7 +66,7 @@ namespace osu.Game.Screens.Play
/// </summary>
public BackgroundScreen? Background { private get; set; }
public FailAnimation(DrawableRuleset drawableRuleset)
public FailAnimationContainer(DrawableRuleset drawableRuleset)
{
this.drawableRuleset = drawableRuleset;

View File

@ -257,7 +257,7 @@ namespace osu.Game.Screens.Play
rulesetSkinProvider.AddRange(new Drawable[]
{
failAnimationLayer = new FailAnimation(DrawableRuleset)
failAnimationContainer = new FailAnimationContainer(DrawableRuleset)
{
OnComplete = onFailComplete,
Children = new[]
@ -310,7 +310,7 @@ namespace osu.Game.Screens.Play
// 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 @@ 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 && GameplayState.HasFailed)
{
failAnimationLayer.FinishTransforms(true);
failAnimationContainer.FinishTransforms(true);
return;
}
@ -888,7 +888,7 @@ namespace osu.Game.Screens.Play
protected FailOverlay FailOverlay { get; private set; }
private FailAnimation failAnimationLayer;
private FailAnimationContainer failAnimationContainer;
private bool onFail()
{
@ -913,7 +913,7 @@ namespace osu.Game.Screens.Play
if (PauseOverlay.State.Value == Visibility.Visible)
PauseOverlay.Hide();
failAnimationLayer.Start();
failAnimationContainer.Start();
if (GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
Restart(true);
@ -1044,7 +1044,7 @@ namespace osu.Game.Screens.Play
b.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
failAnimationLayer.Background = b;
failAnimationContainer.Background = b;
});
HUDOverlay.IsPlaying.BindTo(localUserPlaying);
@ -1099,7 +1099,7 @@ namespace osu.Game.Screens.Play
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)