mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:15:45 +08:00
Merge branch 'master' into rewinding-robustness
This commit is contained in:
commit
e12d0c5875
@ -57,11 +57,6 @@ namespace osu.Game.Graphics
|
|||||||
private void load(FontStore store)
|
private void load(FontStore store)
|
||||||
{
|
{
|
||||||
this.store = store;
|
this.store = store;
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
updateTexture();
|
updateTexture();
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,6 @@ namespace osu.Game.Screens
|
|||||||
{
|
{
|
||||||
base.LogoArriving(logo, resuming);
|
base.LogoArriving(logo, resuming);
|
||||||
|
|
||||||
logo.RelativePositionAxes = Axes.None;
|
|
||||||
logo.Triangles = false;
|
logo.Triangles = false;
|
||||||
logo.Origin = Anchor.BottomRight;
|
logo.Origin = Anchor.BottomRight;
|
||||||
logo.Anchor = Anchor.BottomRight;
|
logo.Anchor = Anchor.BottomRight;
|
||||||
@ -47,11 +46,7 @@ namespace osu.Game.Screens
|
|||||||
protected override void LogoSuspending(OsuLogo logo)
|
protected override void LogoSuspending(OsuLogo logo)
|
||||||
{
|
{
|
||||||
base.LogoSuspending(logo);
|
base.LogoSuspending(logo);
|
||||||
logo.FadeOut(100).OnComplete(l =>
|
logo.FadeOut(100);
|
||||||
{
|
|
||||||
l.Anchor = Anchor.TopLeft;
|
|
||||||
l.Origin = Anchor.Centre;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -127,8 +127,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
if (!resuming)
|
if (!resuming)
|
||||||
{
|
{
|
||||||
logo.Triangles = true;
|
|
||||||
|
|
||||||
logo.ScaleTo(1);
|
logo.ScaleTo(1);
|
||||||
logo.FadeIn();
|
logo.FadeIn();
|
||||||
logo.PlayIntro();
|
logo.PlayIntro();
|
||||||
|
@ -112,9 +112,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
buttons.SetOsuLogo(logo);
|
buttons.SetOsuLogo(logo);
|
||||||
|
|
||||||
logo.Triangles = true;
|
|
||||||
logo.Ripple = false;
|
|
||||||
|
|
||||||
logo.FadeColour(Color4.White, 100, Easing.OutQuint);
|
logo.FadeColour(Color4.White, 100, Easing.OutQuint);
|
||||||
logo.FadeIn(100, Easing.OutQuint);
|
logo.FadeIn(100, Easing.OutQuint);
|
||||||
|
|
||||||
|
@ -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]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures, AudioManager audio)
|
private void load(TextureStore textures, AudioManager audio)
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@ namespace osu.Game.Screens
|
|||||||
protected override void OnResuming(Screen last)
|
protected override void OnResuming(Screen last)
|
||||||
{
|
{
|
||||||
base.OnResuming(last);
|
base.OnResuming(last);
|
||||||
logo.DelayUntilTransformsFinished().Schedule(() => LogoArriving(logo, true));
|
logo.AppendAnimatingAction(() => LogoArriving(logo, true), true);
|
||||||
sampleExit?.Play();
|
sampleExit?.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,11 +118,11 @@ namespace osu.Game.Screens
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((logo = lastOsu?.logo) == null)
|
if ((logo = lastOsu?.logo) == null)
|
||||||
AddInternal(logo = new OsuLogo());
|
LoadComponentAsync(logo = new OsuLogo { Alpha = 0 }, AddInternal);
|
||||||
|
|
||||||
|
logo.AppendAnimatingAction(() => LogoArriving(logo, false), true);
|
||||||
|
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
|
|
||||||
logo.DelayUntilTransformsFinished().Schedule(() => LogoArriving(logo, false));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnExiting(Screen next)
|
protected override bool OnExiting(Screen next)
|
||||||
@ -155,12 +155,16 @@ namespace osu.Game.Screens
|
|||||||
{
|
{
|
||||||
logo.Action = null;
|
logo.Action = null;
|
||||||
logo.FadeOut(300, Easing.OutQuint);
|
logo.FadeOut(300, Easing.OutQuint);
|
||||||
|
logo.Anchor = Anchor.TopLeft;
|
||||||
|
logo.Origin = Anchor.Centre;
|
||||||
|
logo.RelativePositionAxes = Axes.None;
|
||||||
|
logo.Triangles = true;
|
||||||
|
logo.Ripple = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onExitingLogo()
|
private void onExitingLogo()
|
||||||
{
|
{
|
||||||
logo.ClearTransforms();
|
logo.AppendAnimatingAction(() => { LogoExiting(logo); }, false);
|
||||||
LogoExiting(logo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -172,8 +176,7 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
private void onSuspendingLogo()
|
private void onSuspendingLogo()
|
||||||
{
|
{
|
||||||
logo.ClearTransforms();
|
logo.AppendAnimatingAction(() => { LogoSuspending(logo); }, false);
|
||||||
LogoSuspending(logo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -99,7 +99,6 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
base.LogoArriving(logo, resuming);
|
base.LogoArriving(logo, resuming);
|
||||||
|
|
||||||
logo.ClearTransforms(targetMember: nameof(Position));
|
|
||||||
logo.RelativePositionAxes = Axes.Both;
|
logo.RelativePositionAxes = Axes.Both;
|
||||||
|
|
||||||
logo.ScaleTo(new Vector2(0.15f), 300, Easing.In);
|
logo.ScaleTo(new Vector2(0.15f), 300, Easing.In);
|
||||||
|
@ -315,9 +315,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
base.LogoArriving(logo, resuming);
|
base.LogoArriving(logo, resuming);
|
||||||
|
|
||||||
logo.ClearTransforms();
|
|
||||||
logo.RelativePositionAxes = Axes.Both;
|
logo.RelativePositionAxes = Axes.Both;
|
||||||
|
|
||||||
Vector2 position = new Vector2(0.95f, 0.96f);
|
Vector2 position = new Vector2(0.95f, 0.96f);
|
||||||
|
|
||||||
if (logo.Alpha > 0.8f)
|
if (logo.Alpha > 0.8f)
|
||||||
|
Loading…
Reference in New Issue
Block a user