mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Fix logo animations
This commit is contained in:
parent
60cc2314ef
commit
117703374e
@ -181,11 +181,8 @@ namespace osu.Game.Screens.Multi
|
||||
loungeSubScreen.MakeCurrent();
|
||||
updatePollingRate(isIdle.Value);
|
||||
|
||||
logo?.AppendAnimatingAction(() =>
|
||||
{
|
||||
// the wave overlay transition takes longer than expected to run.
|
||||
logo.Delay(WaveContainer.DISAPPEAR_DURATION / 2).FadeOut();
|
||||
}, false);
|
||||
// the wave overlay transition takes longer than expected to run.
|
||||
logo?.AppendAnimatingAction(() => logo.Delay(WaveContainer.DISAPPEAR_DURATION / 2).FadeOut(), false);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -195,6 +192,8 @@ namespace osu.Game.Screens.Multi
|
||||
this.FadeIn(250);
|
||||
this.ScaleTo(1, 250, Easing.OutSine);
|
||||
|
||||
logo?.AppendAnimatingAction(() => OsuScreen.ApplyLogoArrivingDefaults(logo), true);
|
||||
|
||||
updatePollingRate(isIdle.Value);
|
||||
}
|
||||
|
||||
|
@ -155,14 +155,7 @@ namespace osu.Game.Screens
|
||||
/// </summary>
|
||||
protected virtual void LogoArriving(OsuLogo logo, bool resuming)
|
||||
{
|
||||
logo.Action = null;
|
||||
logo.FadeOut(300, Easing.OutQuint);
|
||||
logo.Anchor = Anchor.TopLeft;
|
||||
logo.Origin = Anchor.Centre;
|
||||
logo.RelativePositionAxes = Axes.None;
|
||||
logo.BeatMatching = true;
|
||||
logo.Triangles = true;
|
||||
logo.Ripple = true;
|
||||
ApplyLogoArrivingDefaults(logo);
|
||||
}
|
||||
|
||||
private void applyArrivingDefaults(bool isResuming)
|
||||
@ -179,6 +172,23 @@ namespace osu.Game.Screens
|
||||
updateOverlayStates?.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies default animations to an arriving logo.
|
||||
/// Todo: This should not exist.
|
||||
/// </summary>
|
||||
/// <param name="logo">The logo to apply animations to.</param>
|
||||
public static void ApplyLogoArrivingDefaults(OsuLogo logo)
|
||||
{
|
||||
logo.Action = null;
|
||||
logo.FadeOut(300, Easing.OutQuint);
|
||||
logo.Anchor = Anchor.TopLeft;
|
||||
logo.Origin = Anchor.Centre;
|
||||
logo.RelativePositionAxes = Axes.None;
|
||||
logo.BeatMatching = true;
|
||||
logo.Triangles = true;
|
||||
logo.Ripple = true;
|
||||
}
|
||||
|
||||
private void onExitingLogo()
|
||||
{
|
||||
logo.AppendAnimatingAction(() => LogoExiting(logo), false);
|
||||
|
Loading…
Reference in New Issue
Block a user