mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 04:05:35 +08:00
Fix animations and general code quality
This commit is contained in:
parent
8d3ed05848
commit
f60a80b263
@ -69,63 +69,47 @@ 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[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new LogoVisualisation
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Anchor = Anchor.Centre,
|
||||||
{
|
Origin = Anchor.Centre,
|
||||||
new LogoVisualisation
|
Alpha = 0.5f,
|
||||||
{
|
AccentColour = Color4.DarkBlue,
|
||||||
RelativeSizeAxes = Axes.Both,
|
Size = new Vector2(0.96f)
|
||||||
Anchor = Anchor.Centre,
|
},
|
||||||
Origin = Anchor.Centre,
|
new Circle
|
||||||
Alpha = 0.5f,
|
{
|
||||||
AccentColour = Color4.DarkBlue,
|
Anchor = Anchor.Centre,
|
||||||
Size = new Vector2(0.96f)
|
Origin = Anchor.Centre,
|
||||||
},
|
Size = new Vector2(480),
|
||||||
new Container
|
Colour = Color4.Black
|
||||||
{
|
},
|
||||||
AutoSizeAxes = Axes.Both,
|
welcomeText = new Sprite
|
||||||
Children = new Drawable[]
|
{
|
||||||
{
|
Anchor = Anchor.Centre,
|
||||||
new Circle
|
Origin = Anchor.Centre,
|
||||||
{
|
Texture = textures.Get(@"Intro/Welcome/welcome_text")
|
||||||
Anchor = Anchor.Centre,
|
},
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Size = new Vector2(480),
|
|
||||||
Colour = Color4.Black
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
welcomeText = new Sprite
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Scale = new Vector2(0.1f),
|
|
||||||
Height = 156,
|
|
||||||
Alpha = 0,
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user