1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Enable pooling for taiko DHOs

This commit is contained in:
Bartłomiej Dach 2020-12-20 18:16:05 +01:00
parent 5d575d2a9b
commit b24fc1922e
2 changed files with 13 additions and 17 deletions

View File

@ -7,7 +7,6 @@ using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Taiko.Objects;
using osu.Game.Rulesets.Taiko.Objects.Drawables;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.Taiko.Replays;
using osu.Framework.Input;
@ -64,22 +63,7 @@ namespace osu.Game.Rulesets.Taiko.UI
protected override Playfield CreatePlayfield() => new TaikoPlayfield(Beatmap.ControlPointInfo);
public override DrawableHitObject<TaikoHitObject> CreateDrawableRepresentation(TaikoHitObject h)
{
switch (h)
{
case Hit hit:
return new DrawableHit(hit);
case DrumRoll drumRoll:
return new DrawableDrumRoll(drumRoll);
case Swell swell:
return new DrawableSwell(swell);
}
return null;
}
public override DrawableHitObject<TaikoHitObject> CreateDrawableRepresentation(TaikoHitObject h) => null;
protected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new TaikoFramedReplayInputHandler(replay);

View File

@ -147,6 +147,18 @@ namespace osu.Game.Rulesets.Taiko.UI
},
drumRollHitContainer.CreateProxy(),
};
RegisterPool<Hit, DrawableHit>(50);
RegisterPool<Hit.StrongNestedHit, DrawableHit.StrongNestedHit>(50);
RegisterPool<DrumRoll, DrawableDrumRoll>(5);
RegisterPool<DrumRoll.StrongNestedHit, DrawableDrumRoll.StrongNestedHit>(5);
RegisterPool<DrumRollTick, DrawableDrumRollTick>(100);
RegisterPool<DrumRollTick.StrongNestedHit, DrawableDrumRollTick.StrongNestedHit>(100);
RegisterPool<Swell, DrawableSwell>(5);
RegisterPool<SwellTick, DrawableSwellTick>(100);
}
protected override void LoadComplete()