Use hit object pooling for Fruit and Banana.

This commit is contained in:
ekrctb
2020-11-30 19:07:50 +09:00
parent 94fd607a7c
commit b76ae525b2
5 changed files with 16 additions and 10 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Utils;
@ -16,7 +17,12 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
protected virtual FruitVisualRepresentation GetVisualRepresentation(int indexInBeatmap) => (FruitVisualRepresentation)(indexInBeatmap % 4);
public DrawableFruit(CatchHitObject h)
public DrawableFruit()
: this(null)
{
}
public DrawableFruit([CanBeNull] Fruit h)
: base(h)
{
}