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