mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
GameMode -> Screen.
This commit is contained in:
@ -5,7 +5,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.Graphics.Containers;
|
||||
@ -14,7 +14,7 @@ using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
class Intro : OsuGameMode
|
||||
class Intro : OsuScreen
|
||||
{
|
||||
private OsuLogo logo;
|
||||
|
||||
@ -28,9 +28,9 @@ namespace osu.Game.Screens.Menu
|
||||
private AudioSample seeya;
|
||||
private AudioTrack bgm;
|
||||
|
||||
internal override bool ShowOverlays => (ParentGameMode as OsuGameMode)?.ShowOverlays ?? false;
|
||||
internal override bool ShowOverlays => (ParentScreen as OsuScreen)?.ShowOverlays ?? false;
|
||||
|
||||
protected override BackgroundMode CreateBackground() => new BackgroundModeEmpty();
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenEmpty();
|
||||
|
||||
public Intro()
|
||||
{
|
||||
@ -65,7 +65,7 @@ namespace osu.Game.Screens.Menu
|
||||
bgm.Looping = true;
|
||||
}
|
||||
|
||||
protected override void OnEntering(GameMode last)
|
||||
protected override void OnEntering(Screen last)
|
||||
{
|
||||
base.OnEntering(last);
|
||||
|
||||
@ -77,8 +77,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
bgm.Start();
|
||||
|
||||
mainMenu = new MainMenu();
|
||||
mainMenu.Preload(Game);
|
||||
(mainMenu = new MainMenu()).Preload(Game);
|
||||
|
||||
Scheduler.AddDelayed(delegate
|
||||
{
|
||||
@ -95,19 +94,19 @@ namespace osu.Game.Screens.Menu
|
||||
logo.FadeIn(20000, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
protected override void OnSuspending(GameMode next)
|
||||
protected override void OnSuspending(Screen next)
|
||||
{
|
||||
Content.FadeOut(300);
|
||||
base.OnSuspending(next);
|
||||
}
|
||||
|
||||
protected override bool OnExiting(GameMode next)
|
||||
protected override bool OnExiting(Screen next)
|
||||
{
|
||||
//cancel exiting if we haven't loaded the menu yet.
|
||||
return !DidLoadMenu;
|
||||
}
|
||||
|
||||
protected override void OnResuming(GameMode last)
|
||||
protected override void OnResuming(Screen last)
|
||||
{
|
||||
if (!(last is MainMenu))
|
||||
Content.FadeIn(300);
|
||||
|
Reference in New Issue
Block a user