mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Make the osu! logo shared game-wide
There should only ever be one osu! logo. It is now passed around between screens in a superfluous manner.
This commit is contained in:
@ -10,9 +10,9 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Menu;
|
||||
using OpenTK;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Screens.Menu;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -20,7 +20,6 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
private Player player;
|
||||
|
||||
private readonly OsuLogo logo;
|
||||
private BeatmapMetadataDisplay info;
|
||||
|
||||
private bool showOverlays = true;
|
||||
@ -39,15 +38,6 @@ namespace osu.Game.Screens.Play
|
||||
showOverlays = false;
|
||||
ValidForResume = true;
|
||||
};
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
logo = new OsuLogo
|
||||
{
|
||||
Scale = new Vector2(0.15f),
|
||||
Interactive = false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -101,11 +91,24 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
contentIn();
|
||||
|
||||
logo.Delay(500).MoveToOffset(new Vector2(0, -180), 500, Easing.InOutExpo);
|
||||
info.Delay(750).FadeIn(500);
|
||||
this.Delay(2150).Schedule(pushWhenLoaded);
|
||||
}
|
||||
|
||||
protected override void LogoSetup(OsuLogo logo, bool resuming)
|
||||
{
|
||||
base.LogoSetup(logo, resuming);
|
||||
|
||||
logo.ClearTransforms(targetMember: nameof(Position));
|
||||
logo.RelativePositionAxes = Axes.Both;
|
||||
|
||||
logo.ScaleTo(new Vector2(0.15f), 300, Easing.In);
|
||||
logo.MoveTo(new Vector2(0.5f), 300, Easing.In);
|
||||
logo.FadeIn();
|
||||
|
||||
logo.Delay(500).MoveToOffset(new Vector2(0, -0.24f), 500, Easing.InOutExpo);
|
||||
}
|
||||
|
||||
private void pushWhenLoaded()
|
||||
{
|
||||
if (player.LoadState != LoadState.Ready)
|
||||
|
Reference in New Issue
Block a user