Pass DroppedObjectContainer via constructor instead of DI

It is now just one level deep, so it is not beneficial to use DI here.
This effectively reverts ae09c23e.
This commit is contained in:
ekrctb
2021-07-19 20:11:49 +09:00
parent 50f9e5f362
commit b88ee3c1a1
6 changed files with 46 additions and 65 deletions

View File

@ -3,7 +3,6 @@
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -24,16 +23,12 @@ namespace osu.Game.Rulesets.Catch.Tests
{
public class TestSceneCatchSkinConfiguration : OsuTestScene
{
[Cached]
private readonly DroppedObjectContainer droppedObjectContainer;
private Catcher catcher;
private readonly Container container;
public TestSceneCatchSkinConfiguration()
{
Add(droppedObjectContainer = new DroppedObjectContainer());
Add(container = new Container { RelativeSizeAxes = Axes.Both });
}
@ -46,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())
Child = catcher = new Catcher(new Container(), new DroppedObjectContainer())
{
Anchor = Anchor.Centre
}