Move InputManager to a higher and more implicit level.

Also makes KeyCounterCollection work with replays.
This commit is contained in:
Dean Herbert
2017-03-07 19:30:39 +09:00
parent 1fb846e61d
commit 02cab41d34
12 changed files with 84 additions and 53 deletions

View File

@ -124,10 +124,15 @@ namespace osu.Game.Screens.Play
OnQuit = Exit
};
hitRenderer = ruleset.CreateHitRendererWith(beatmap, new PlayerInputManager
hitRenderer = ruleset.CreateHitRendererWith(beatmap);
if (ReplayInputHandler != null)
{
ReplayInputHandler = ReplayInputHandler
});
ReplayInputHandler.ToScreenSpace = hitRenderer.MapPlayfieldToScreenSpace;
hitRenderer.InputManager.ReplayInputHandler = ReplayInputHandler;
}
scoreOverlay.BindHitRenderer(hitRenderer);
//bind HitRenderer to ScoreProcessor and ourselves (for a pass situation)
hitRenderer.OnJudgement += scoreProcessor.AddJudgement;
@ -228,8 +233,8 @@ namespace osu.Game.Screens.Play
if (!Push(newPlayer))
{
// Error(?)
}
// Error(?)
}
});
}