Merge branch 'single-osu-logo' into intro-v2

This commit is contained in:
Dean Herbert
2017-11-08 16:43:07 +09:00
9 changed files with 34 additions and 53 deletions

View File

@ -326,8 +326,6 @@ namespace osu.Game.Screens.Menu
private bool trackingPosition;
public void SetLogoTracking(bool value) => trackingPosition = value;
protected override void Update()
{
//if (OsuGame.IdleTime > 6000 && State != MenuState.Exit)

View File

@ -111,9 +111,9 @@ namespace osu.Game.Screens.Menu
public const int EXIT_DELAY = 3000;
protected override void LogoSetup(OsuLogo logo, bool resuming)
protected override void OnArrivedLogo(OsuLogo logo, bool resuming)
{
base.LogoSetup(logo, resuming);
base.OnArrivedLogo(logo, resuming);
logo.RelativePositionAxes = Axes.Both;

View File

@ -106,9 +106,9 @@ namespace osu.Game.Screens.Menu
Beatmap.ValueChanged += beatmap_ValueChanged;
}
protected override void LogoSetup(OsuLogo logo, bool resuming)
protected override void OnArrivedLogo(OsuLogo logo, bool resuming)
{
base.LogoSetup(logo, resuming);
base.OnArrivedLogo(logo, resuming);
buttons.SetOsuLogo(logo);
@ -122,7 +122,7 @@ namespace osu.Game.Screens.Menu
buttons.State = MenuState.TopLevel;
}
protected override void LogoOnSuspending(OsuLogo logo)
protected override void OnSuspendingLogo(OsuLogo logo)
{
logo.FadeOut(300, Easing.InSine)
.ScaleTo(0.2f, 300, Easing.InSine)

View File

@ -230,27 +230,6 @@ namespace osu.Game.Screens.Menu
ripple.Texture = textures.Get(@"Menu/logo");
}
private double? reservationEndTime;
private Action<OsuLogo> reservationCallback;
private bool canFulfillReservation => !reservationEndTime.HasValue || reservationEndTime <= Time.Current;
public void RequestUsage(Action<OsuLogo> callback)
{
reservationCallback = callback;
}
private void fulfillReservation()
{
reservationCallback(this);
reservationCallback = null;
}
public void ReserveFor(float duration)
{
reservationEndTime = Time.Current + duration;
}
private int lastBeatIndex;
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
@ -328,9 +307,6 @@ namespace osu.Game.Screens.Menu
{
triangles.Velocity = paused_velocity;
}
if (reservationCallback != null && canFulfillReservation)
fulfillReservation();
}
private bool interactive => Action != null && Alpha > 0.2f;