Refactor fruit dropping code

- The repeated `Remove` call was quadratic complexity.
  Now it is linear time.
This commit is contained in:
ekrctb
2020-12-02 21:23:34 +09:00
parent 873f2363c1
commit 2eb2c934cc
4 changed files with 65 additions and 64 deletions

View File

@ -22,11 +22,6 @@ namespace osu.Game.Rulesets.Catch.UI
public readonly Catcher MovableCatcher;
private readonly CatchComboDisplay comboDisplay;
public Container ExplodingFruitTarget
{
set => MovableCatcher.ExplodingFruitTarget = value;
}
public CatcherArea(BeatmapDifficulty difficulty = null)
{
Size = new Vector2(CatchPlayfield.WIDTH, CATCHER_SIZE);
@ -41,7 +36,7 @@ namespace osu.Game.Rulesets.Catch.UI
Margin = new MarginPadding { Bottom = 350f },
X = CatchPlayfield.CENTER_X
},
MovableCatcher = new Catcher(this, difficulty) { X = CatchPlayfield.CENTER_X },
MovableCatcher = new Catcher(this, this, difficulty) { X = CatchPlayfield.CENTER_X },
};
}