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

@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Catch.Tests
var skin = new TestSkin { FlipCatcherPlate = flip };
container.Child = new SkinProvidingContainer(skin)
{
Child = catcher = new Catcher(new Container(), new DroppedObjectContainer())
Child = catcher = new Catcher(new CatcherTrailDisplay(), new DroppedObjectContainer())
{
Anchor = Anchor.Centre
}