diff --git a/osu.Game.Rulesets.Taiko/Objects/Hit.cs b/osu.Game.Rulesets.Taiko/Objects/Hit.cs index f41ea3216d..2de61ba8e6 100644 --- a/osu.Game.Rulesets.Taiko/Objects/Hit.cs +++ b/osu.Game.Rulesets.Taiko/Objects/Hit.cs @@ -42,8 +42,9 @@ namespace osu.Game.Rulesets.Taiko.Objects SamplesBindable.BindCollectionChanged((_, _) => updateTypeFromSamples()); } - public Hit(HitType type) : this() + public Hit(HitType type, bool isStroing) : this() { + IsStrong = isStroing; Type = type; } diff --git a/osu.Game.Rulesets.Taiko/UI/HitPool.cs b/osu.Game.Rulesets.Taiko/UI/HitPool.cs index f627304fd6..5ccb1633f0 100644 --- a/osu.Game.Rulesets.Taiko/UI/HitPool.cs +++ b/osu.Game.Rulesets.Taiko/UI/HitPool.cs @@ -11,13 +11,15 @@ namespace osu.Game.Rulesets.Taiko.UI internal partial class HitPool : DrawablePool { private readonly HitType hitType; + private readonly bool isStrong; - public HitPool(HitType hitType, int initialSize) + public HitPool(int initialSize, HitType hitType, bool isStrong) : base(initialSize) { this.hitType = hitType; + this.isStrong = isStrong; } - protected override DrawableHit CreateNewDrawable() => new DrawableHit(new Hit(hitType)); + protected override DrawableHit CreateNewDrawable() => new DrawableHit(new Hit(hitType, isStrong)); } } diff --git a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs index b518e6e4de..6351653e1a 100644 --- a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs +++ b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs @@ -205,18 +205,20 @@ namespace osu.Game.Rulesets.Taiko.UI AddRangeInternal(poolsHit.Values); } - private readonly IDictionary poolsHit = new Dictionary() + private readonly IDictionary<(HitType, bool), HitPool> poolsHit = new Dictionary<(HitType, bool), HitPool>() { - {HitType.Centre, new HitPool(HitType.Centre, 50)}, - {HitType.Rim, new HitPool(HitType.Rim, 50)}, + // Non strong (pool size is 50 for each type): + {(HitType.Centre, false), new HitPool(50, HitType.Centre, false)}, + {(HitType.Rim, false), new HitPool(50, HitType.Rim, false)}, + // Strong (pool size is 20 for each type): + {(HitType.Centre, true), new HitPool(20, HitType.Centre, true)}, + {(HitType.Rim, true), new HitPool(20, HitType.Rim, true)}, }; protected override IDrawablePool? AdditionalPrepareDrawablePool(HitObject hitObject) { switch (hitObject) { - case Hit hit: return poolsHit[hit.Type]; - // TODO: ??? - //case Hit.StrongNestedHit hitStrong: return ; + case Hit hit: return poolsHit[(hit.Type, hit.IsStrong)]; default: return null; } }