1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 06:23:21 +08:00

Fix animations and general code quality

This commit is contained in:
Dean Herbert 2020-06-22 18:01:08 +09:00
parent 8d3ed05848
commit f60a80b263

View File

@ -69,24 +69,21 @@ namespace osu.Game.Screens.Menu
private class WelcomeIntroSequence : Container private class WelcomeIntroSequence : Container
{ {
private Sprite welcomeText; private Sprite welcomeText;
private Container scaleContainer;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(TextureStore textures) private void load(TextureStore textures)
{ {
Origin = Anchor.Centre; Origin = Anchor.Centre;
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
Children = new Drawable[] Children = new Drawable[]
{ {
new Container scaleContainer = new Container
{ {
AutoSizeAxes = Axes.Both,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
new Container
{
AutoSizeAxes = Axes.Both,
Children = new Drawable[] Children = new Drawable[]
{ {
new LogoVisualisation new LogoVisualisation
@ -98,34 +95,21 @@ namespace osu.Game.Screens.Menu
AccentColour = Color4.DarkBlue, AccentColour = Color4.DarkBlue,
Size = new Vector2(0.96f) Size = new Vector2(0.96f)
}, },
new Container
{
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
new Circle new Circle
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Size = new Vector2(480), Size = new Vector2(480),
Colour = Color4.Black Colour = Color4.Black
}
}
}
}
}
}
}, },
welcomeText = new Sprite welcomeText = new Sprite
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,
Scale = new Vector2(0.1f),
Height = 156,
Alpha = 0,
Texture = textures.Get(@"Intro/Welcome/welcome_text") Texture = textures.Get(@"Intro/Welcome/welcome_text")
}, },
}
},
}; };
} }
@ -135,9 +119,10 @@ namespace osu.Game.Screens.Menu
using (BeginDelayedSequence(0, true)) using (BeginDelayedSequence(0, true))
{ {
welcomeText.ResizeHeightTo(welcomeText.Height * 2, 500, Easing.In); scaleContainer.ScaleTo(0.9f).ScaleTo(1, delay_step_two).OnComplete(_ => Expire());
welcomeText.FadeIn(delay_step_two); scaleContainer.FadeInFromZero(1800);
welcomeText.ScaleTo(welcomeText.Scale + new Vector2(0.1f), delay_step_two, Easing.Out).OnComplete(_ => Expire());
welcomeText.ScaleTo(new Vector2(1, 0)).ScaleTo(Vector2.One, 400, Easing.Out);
} }
} }
} }