1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix osu logo shockwave playing when transition is aborted

This is a very nice use-case scenario for TransformSequence.OnComplete
This commit is contained in:
Thomas Müller 2017-07-18 15:28:56 +03:00
parent ed793328f1
commit b40c897dbd

View File

@ -250,15 +250,13 @@ namespace osu.Game.Screens.Menu
case MenuState.TopLevel:
buttonAreaBackground.ScaleTo(Vector2.One, 200, EasingTypes.Out);
osuLogo.ClearTransforms();
osuLogo.MoveTo(buttonFlow.DrawPosition, 200, EasingTypes.In);
osuLogo.ScaleTo(0.5f, 200, EasingTypes.In);
buttonArea.FadeIn(300);
var sequence = osuLogo.ScaleTo(0.5f, 200, EasingTypes.In);
if (fromInitial && osuLogo.Scale.X > 0.5f)
using (osuLogo.BeginDelayedSequence(200, true))
osuLogo.Impact();
sequence.OnComplete(o => o.Impact());
buttonArea.FadeIn(300);
Scheduler.AddDelayed(() => toolbar?.Show(), 150);