Resolve DroppedObjectContainer via DI

This commit is contained in:
ekrctb
2021-06-24 15:56:53 +09:00
parent 16d5893535
commit ae09c23e4e
6 changed files with 54 additions and 34 deletions

View File

@ -118,11 +118,10 @@ namespace osu.Game.Rulesets.Catch.Tests
AddStep("create hyper-dashing catcher", () =>
{
Child = setupSkinHierarchy(catcherArea = new CatcherArea(new DroppedObjectContainer())
Child = setupSkinHierarchy(catcherArea = new TestCatcherArea
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Scale = new Vector2(4f),
Origin = Anchor.Centre
}, skin);
});
@ -206,5 +205,18 @@ namespace osu.Game.Rulesets.Catch.Tests
{
}
}
private class TestCatcherArea : CatcherArea
{
[Cached]
private readonly DroppedObjectContainer droppedObjectContainer;
public TestCatcherArea()
{
Scale = new Vector2(4f);
AddInternal(droppedObjectContainer = new DroppedObjectContainer());
}
}
}
}