Fix multiple order-of-execution issues with osu! logo

Also sets better defaults.
This commit is contained in:
Dean Herbert
2017-11-13 18:43:05 +09:00
parent 615984ca9c
commit 49a5af60e2
7 changed files with 36 additions and 22 deletions

View File

@ -127,8 +127,6 @@ namespace osu.Game.Screens.Menu
if (!resuming)
{
logo.Triangles = true;
logo.ScaleTo(1);
logo.FadeIn();
logo.PlayIntro();

View File

@ -112,9 +112,6 @@ namespace osu.Game.Screens.Menu
buttons.SetOsuLogo(logo);
logo.Triangles = true;
logo.Ripple = false;
logo.FadeColour(Color4.White, 100, Easing.OutQuint);
logo.FadeIn(100, Easing.OutQuint);

View File

@ -221,6 +221,30 @@ namespace osu.Game.Screens.Menu
};
}
/// <summary>
/// Schedule a new extenral animation. Handled queueing and finishing previous animations in a sane way.
/// </summary>
/// <param name="action">The animation to be performed</param>
/// <param name="waitForPrevious">If true, the new animation is delayed until all previous transforms finish. If false, existing transformed are cleared.</param>
internal void AppendAnimatingAction(Action action, bool waitForPrevious)
{
Action runnableAction = () =>
{
if (waitForPrevious)
this.DelayUntilTransformsFinished().Schedule(action);
else
{
ClearTransforms();
action();
}
};
if (IsLoaded)
runnableAction();
else
Schedule(() => runnableAction());
}
[BackgroundDependencyLoader]
private void load(TextureStore textures, AudioManager audio)
{