1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:03:08 +08:00

Fix additive target accidentally clears all of the added containers

It sets the AdditiveTarget on the object initializer but then the catcher is set to Child which wipes up all of the existing children (containers added by Catcher through AdditiveTarget setter)
This commit is contained in:
Salman Ahmed 2020-03-26 09:14:44 +03:00
parent 302fdd834a
commit fecafc2e48

View File

@ -33,10 +33,10 @@ namespace osu.Game.Rulesets.Catch.UI
{ {
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Height = CATCHER_SIZE; Height = CATCHER_SIZE;
Child = MovableCatcher = new Catcher(difficulty) Child = MovableCatcher = new Catcher(difficulty);
{
AdditiveTarget = this, // this property adds containers to 'this' so it must not be set in the object initializer.
}; MovableCatcher.AdditiveTarget = this;
} }
public static float GetCatcherSize(BeatmapDifficulty difficulty) public static float GetCatcherSize(BeatmapDifficulty difficulty)