1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 10:13:21 +08:00
osu-lazer/osu.Game/Screens/Menu/IntroCircles.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.8 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2018-04-13 17:19:50 +08:00
2022-06-17 15:37:17 +08:00
#nullable disable
using System;
using JetBrains.Annotations;
2016-11-14 16:23:33 +08:00
using osu.Framework.Allocation;
2019-09-24 18:17:27 +08:00
using osu.Framework.Audio;
2019-10-08 11:07:59 +08:00
using osu.Framework.Audio.Sample;
2017-02-17 17:59:30 +08:00
using osu.Framework.Screens;
2016-10-07 16:07:23 +08:00
using osu.Framework.Graphics;
2018-04-13 17:19:50 +08:00
2016-11-14 16:23:33 +08:00
namespace osu.Game.Screens.Menu
{
public class IntroCircles : IntroScreen
{
2019-09-23 20:52:44 +08:00
protected override string BeatmapHash => "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
2018-04-13 17:19:50 +08:00
2019-09-23 20:52:44 +08:00
protected override string BeatmapFile => "circles.osz";
2019-09-23 20:52:44 +08:00
private const double delay_step_one = 2300;
private const double delay_step_two = 600;
2018-04-13 17:19:50 +08:00
2021-01-19 16:11:40 +08:00
private Sample welcome;
2019-10-08 11:07:59 +08:00
public IntroCircles([CanBeNull] Func<MainMenu> createNextScreen = null)
: base(createNextScreen)
{
}
[BackgroundDependencyLoader]
2019-09-24 18:17:27 +08:00
private void load(AudioManager audio)
2016-11-01 22:24:14 +08:00
{
2019-09-23 20:52:44 +08:00
if (MenuVoice.Value)
2020-06-23 20:34:57 +08:00
welcome = audio.Samples.Get(@"Intro/welcome");
2016-11-01 22:24:14 +08:00
}
2018-04-13 17:19:50 +08:00
2017-11-09 16:38:20 +08:00
protected override void LogoArriving(OsuLogo logo, bool resuming)
{
2017-11-09 16:38:20 +08:00
base.LogoArriving(logo, resuming);
2018-04-13 17:19:50 +08:00
if (!resuming)
{
2019-10-08 11:07:59 +08:00
welcome?.Play();
Scheduler.AddDelayed(delegate
{
2019-10-08 11:03:42 +08:00
StartTrack();
PrepareMenuLoad();
Scheduler.AddDelayed(LoadMenu, delay_step_one);
}, delay_step_two);
2018-04-13 17:19:50 +08:00
2017-11-08 13:31:11 +08:00
logo.ScaleTo(1);
logo.FadeIn();
logo.PlayIntro();
}
2016-10-07 16:07:23 +08:00
}
2018-04-13 17:19:50 +08:00
public override void OnSuspending(ScreenTransitionEvent e)
2016-10-07 16:07:23 +08:00
{
2019-01-23 19:52:00 +08:00
this.FadeOut(300);
base.OnSuspending(e);
}
}
}