Move catcher trail generation logic to Catcher

It resolves mutual dependency of `Catcher` and `CatcherTrailDisplay`.
Trail generation logic is moved to `Catcher`.
The generation logic no longer uses delayed scheduling because the hidden state is hard to manage.
Instead, the last time a trail is generated is calculated and used.
The new logic has a different behavior when the dash key is pressed in succession under 50ms, but it is not noticeable for normal plays.
This commit is contained in:
ekrctb
2021-07-26 17:46:56 +09:00
parent 9ae3c685db
commit bb046fa3b8
7 changed files with 56 additions and 93 deletions

View File

@ -121,11 +121,13 @@ namespace osu.Game.Rulesets.Catch.Tests
{
public TestCatcherArea(BeatmapDifficulty beatmapDifficulty)
{
var droppedObjectContainer = new DroppedObjectContainer();
var trailDisplay = new CatcherTrailDisplay { Depth = -1 };
Add(trailDisplay);
var droppedObjectContainer = new DroppedObjectContainer();
Add(droppedObjectContainer);
Catcher = new Catcher(this, droppedObjectContainer, beatmapDifficulty)
Catcher = new Catcher(trailDisplay, droppedObjectContainer, beatmapDifficulty)
{
X = CatchPlayfield.CENTER_X
};