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

@ -35,21 +35,19 @@ namespace osu.Game.Rulesets.Catch.UI
internal readonly CatcherArea CatcherArea;
[Cached]
private readonly DroppedObjectContainer droppedObjectContainer;
public CatchPlayfield(BeatmapDifficulty difficulty)
{
var trailContainer = new Container();
var droppedObjectContainer = new DroppedObjectContainer();
Catcher = new Catcher(trailContainer, difficulty)
Catcher = new Catcher(trailContainer, droppedObjectContainer, difficulty)
{
X = CENTER_X
};
InternalChildren = new[]
{
droppedObjectContainer = new DroppedObjectContainer(),
droppedObjectContainer,
Catcher.CreateProxiedContent(),
HitObjectContainer.CreateProxy(),
// This ordering (`CatcherArea` before `HitObjectContainer`) is important to
@ -58,7 +56,7 @@ namespace osu.Game.Rulesets.Catch.UI
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.TopLeft,
MovableCatcher = Catcher
MovableCatcher = Catcher,
},
trailContainer,
HitObjectContainer,