Use hit object pooling for JuiceStream.

- Use `Clear(false)` to not dispose pooled children.
- Don't set nested DHO `Origin`.
- Simplify the layout (remove custom `Origin`).
This commit is contained in:
ekrctb
2020-11-30 19:19:14 +09:00
parent b76ae525b2
commit 9611aaf09e
4 changed files with 9 additions and 26 deletions

View File

@ -64,6 +64,7 @@ namespace osu.Game.Rulesets.Catch.UI
RegisterPool<TinyDroplet, DrawableTinyDroplet>(1);
RegisterPool<Fruit, DrawableFruit>(1);
RegisterPool<Banana, DrawableBanana>(1);
RegisterPool<JuiceStream, DrawableJuiceStream>(1);
}
protected override void LoadComplete()

View File

@ -44,9 +44,6 @@ namespace osu.Game.Rulesets.Catch.UI
{
switch (h)
{
case JuiceStream stream:
return new DrawableJuiceStream(stream, CreateDrawableRepresentation);
case BananaShower shower:
return new DrawableBananaShower(shower, CreateDrawableRepresentation);
}