mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Basic logic
This commit is contained in:
@ -14,13 +14,12 @@ using osu.Game.Beatmaps.IO;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
public class Intro : OsuScreen
|
||||
{
|
||||
private readonly OsuLogo logo;
|
||||
private readonly IntroSequence introSequence;
|
||||
|
||||
private const string menu_music_beatmap_hash = "715a09144f885d746644c1983e285044";
|
||||
|
||||
@ -46,18 +45,7 @@ namespace osu.Game.Screens.Menu
|
||||
new ParallaxContainer
|
||||
{
|
||||
ParallaxAmount = 0.01f,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
logo = new OsuLogo
|
||||
{
|
||||
Alpha = 0,
|
||||
Triangles = false,
|
||||
Blending = BlendingMode.Additive,
|
||||
Interactive = false,
|
||||
Colour = Color4.DarkGray,
|
||||
Ripple = false
|
||||
}
|
||||
}
|
||||
Child = introSequence = new IntroSequence(),
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -122,14 +110,10 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
DidLoadMenu = true;
|
||||
Push(mainMenu);
|
||||
}, 2300);
|
||||
}, 3200);
|
||||
}, 600);
|
||||
|
||||
logo.ScaleTo(0.4f);
|
||||
logo.FadeOut();
|
||||
|
||||
logo.ScaleTo(1, 4400, Easing.OutQuint);
|
||||
logo.FadeIn(20000, Easing.OutQuint);
|
||||
introSequence.Start();
|
||||
}
|
||||
|
||||
protected override void OnSuspending(Screen next)
|
||||
|
48
osu.Game/Screens/Menu/IntroSequence.cs
Normal file
48
osu.Game/Screens/Menu/IntroSequence.cs
Normal file
@ -0,0 +1,48 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
public class IntroSequence : Container
|
||||
{
|
||||
private OsuSpriteText welcomeText;
|
||||
|
||||
public IntroSequence()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Children = new Drawable[]
|
||||
{
|
||||
welcomeText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Text = "welcome",
|
||||
Font = @"Exo2.0-Light",
|
||||
TextSize = 50,
|
||||
Alpha = 0,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
welcomeText.FadeIn(1000);
|
||||
welcomeText.TransformSpacingTo(new Vector2(20, 0), 3000, Easing.OutQuint);
|
||||
}
|
||||
|
||||
public void Restart()
|
||||
{
|
||||
FinishTransforms(true);
|
||||
|
||||
welcomeText.Alpha = 0;
|
||||
welcomeText.Spacing = Vector2.Zero;
|
||||
|
||||
Start();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user