1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:07:25 +08:00

Avoid polluting Player with HUD-specific code.

This commit is contained in:
Dean Herbert 2017-05-08 11:48:40 +09:00
parent 10910cfcef
commit 48368779ab
2 changed files with 5 additions and 4 deletions

View File

@ -109,6 +109,11 @@ namespace osu.Game.Screens.Play
public virtual void BindHitRenderer(HitRenderer hitRenderer)
{
hitRenderer.InputManager.Add(KeyCounter.GetReceptor());
// in the case a replay isn't loaded, we want some elements to only appear briefly.
if (!hitRenderer.HasReplayLoaded)
using (ModDisplay.BeginDelayedSequence(2000))
ModDisplay.FadeOut(200);
}
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)

View File

@ -356,10 +356,6 @@ namespace osu.Game.Screens.Play
hitRendererContainer.Alpha = 0;
hitRendererContainer.FadeIn(750, EasingTypes.OutQuint);
if (!HitRenderer.HasReplayLoaded)
using (hudOverlay.ModDisplay.BeginDelayedSequence(2000))
hudOverlay.ModDisplay.FadeOut(200);
}
protected override void OnSuspending(Screen next)