2019-01-24 08:43:03 +00:00
|
|
|
|
// 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 09:19:50 +00:00
|
|
|
|
|
2021-10-07 07:38:22 +00:00
|
|
|
|
using System;
|
|
|
|
|
using JetBrains.Annotations;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
using osu.Framework.Allocation;
|
2019-09-24 10:17:27 +00:00
|
|
|
|
using osu.Framework.Audio;
|
2019-10-08 03:07:59 +00:00
|
|
|
|
using osu.Framework.Audio.Sample;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
using osu.Framework.Screens;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Menu
|
|
|
|
|
{
|
2019-07-09 08:59:40 +00:00
|
|
|
|
public class IntroCircles : IntroScreen
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2019-09-23 12:52:44 +00:00
|
|
|
|
protected override string BeatmapHash => "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2019-09-23 12:52:44 +00:00
|
|
|
|
protected override string BeatmapFile => "circles.osz";
|
2019-07-04 02:18:29 +00:00
|
|
|
|
|
2019-09-23 12:52:44 +00:00
|
|
|
|
private const double delay_step_one = 2300;
|
|
|
|
|
private const double delay_step_two = 600;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2021-01-19 08:11:40 +00:00
|
|
|
|
private Sample welcome;
|
2019-10-08 03:07:59 +00:00
|
|
|
|
|
2021-10-07 07:38:22 +00:00
|
|
|
|
public IntroCircles([CanBeNull] Func<MainMenu> createNextScreen = null)
|
|
|
|
|
: base(createNextScreen)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-13 09:19:50 +00:00
|
|
|
|
[BackgroundDependencyLoader]
|
2019-09-24 10:17:27 +00:00
|
|
|
|
private void load(AudioManager audio)
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2019-09-23 12:52:44 +00:00
|
|
|
|
if (MenuVoice.Value)
|
2020-06-23 12:34:57 +00:00
|
|
|
|
welcome = audio.Samples.Get(@"Intro/welcome");
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
|
|
|
|
{
|
|
|
|
|
base.LogoArriving(logo, resuming);
|
|
|
|
|
|
2018-05-30 11:21:53 +00:00
|
|
|
|
if (!resuming)
|
|
|
|
|
{
|
2019-10-08 03:07:59 +00:00
|
|
|
|
welcome?.Play();
|
2018-05-30 11:21:53 +00:00
|
|
|
|
|
|
|
|
|
Scheduler.AddDelayed(delegate
|
|
|
|
|
{
|
2019-10-08 03:03:42 +00:00
|
|
|
|
StartTrack();
|
2018-05-30 11:21:53 +00:00
|
|
|
|
|
2019-07-09 08:59:40 +00:00
|
|
|
|
PrepareMenuLoad();
|
2018-05-30 11:21:53 +00:00
|
|
|
|
|
2019-07-09 08:59:40 +00:00
|
|
|
|
Scheduler.AddDelayed(LoadMenu, delay_step_one);
|
2018-05-30 11:21:53 +00:00
|
|
|
|
}, delay_step_two);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
logo.ScaleTo(1);
|
|
|
|
|
logo.FadeIn();
|
|
|
|
|
logo.PlayIntro();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-23 11:52:00 +00:00
|
|
|
|
public override void OnSuspending(IScreen next)
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2019-01-23 11:52:00 +00:00
|
|
|
|
this.FadeOut(300);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
base.OnSuspending(next);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|