Refactor catch default piece to allow reuse

But Fruit in-place update is still incomplete,
as child drawables are recreated when reused.
This commit is contained in:
ekrctb
2020-12-07 13:14:00 +09:00
parent d51d2c5331
commit 0d73bf8488
5 changed files with 83 additions and 57 deletions

View File

@ -36,11 +36,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
ScaleContainer.Child = new SkinnableDrawable(
new CatchSkinComponent(this is DrawableBanana ? CatchSkinComponents.Banana : CatchSkinComponents.Fruit),
_ => new FruitPiece
{
VisualRepresentation = { BindTarget = VisualRepresentation },
HyperDash = { BindTarget = HyperDash },
});
_ => new FruitPiece());
}
protected override void UpdateInitialTransforms()