Reverted Player to upstream

This commit is contained in:
DrabWeb 2017-01-27 14:29:51 -04:00
parent 490feac030
commit 601a5ed39c

View File

@ -15,7 +15,6 @@ using osu.Game.Modes;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Screens.Backgrounds;
using osu.Game.Overlays.Pause;
using OpenTK.Input;
using MouseState = osu.Framework.Input.MouseState;
using OpenTK;
@ -49,9 +48,6 @@ namespace osu.Game.Screens.Play
private HitRenderer hitRenderer;
private Bindable<int> dimLevel;
private PauseOverlay pauseOverlay;
private ScoreOverlay scoreOverlay;
[BackgroundDependencyLoader]
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game, OsuConfigManager config)
{
@ -96,15 +92,9 @@ namespace osu.Game.Screens.Play
ruleset = Ruleset.GetRuleset(usablePlayMode);
scoreOverlay = ruleset.CreateScoreOverlay();
var scoreOverlay = ruleset.CreateScoreOverlay();
scoreOverlay.BindProcessor(scoreProcessor = ruleset.CreateScoreProcessor(beatmap.HitObjects.Count));
pauseOverlay = new PauseOverlay();
pauseOverlay.OnPause += onPause;
pauseOverlay.OnResume += onResume;
pauseOverlay.OnRetry += onRetry;
pauseOverlay.OnQuit += onQuit;
hitRenderer = ruleset.CreateHitRendererWith(beatmap.HitObjects);
//bind HitRenderer to ScoreProcessor and ourselves (for a pass situation)
@ -129,7 +119,6 @@ namespace osu.Game.Screens.Play
}
},
scoreOverlay,
pauseOverlay
};
}
@ -174,28 +163,6 @@ namespace osu.Game.Screens.Play
});
}
private void onPause()
{
scoreOverlay.KeyCounter.IsCounting = false;
sourceClock.Stop();
}
private void onResume()
{
scoreOverlay.KeyCounter.IsCounting = true;
sourceClock.Start();
}
private void onRetry()
{
}
private void onQuit()
{
Exit();
}
protected override void OnEntering(GameMode last)
{
base.OnEntering(last);
@ -214,17 +181,6 @@ namespace osu.Game.Screens.Play
return base.OnExiting(next);
}
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{
if (args.Key != Key.Escape)
{
return base.OnKeyDown(state, args);
}
else {
return pauseOverlay.TriggerKeyDown(state, args);
}
}
private void dimChanged(object sender, EventArgs e)
{
Background?.FadeTo((100f - dimLevel) / 100, 800);