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

@ -74,8 +74,7 @@ namespace osu.Game.Rulesets.Catch.UI
/// <summary>
/// Contains objects dropped from the plate.
/// </summary>
[Resolved]
private DroppedObjectContainer droppedObjectTarget { get; set; }
private readonly DroppedObjectContainer droppedObjectTarget;
public CatcherAnimationState CurrentState
{
@ -134,9 +133,10 @@ namespace osu.Game.Rulesets.Catch.UI
private readonly DrawablePool<CaughtBanana> caughtBananaPool;
private readonly DrawablePool<CaughtDroplet> caughtDropletPool;
public Catcher([NotNull] Container trailsTarget, BeatmapDifficulty difficulty = null)
public Catcher([NotNull] Container trailsTarget, DroppedObjectContainer droppedObjectTarget, BeatmapDifficulty difficulty = null)
{
this.trailsTarget = trailsTarget;
this.droppedObjectTarget = droppedObjectTarget;
Origin = Anchor.TopCentre;