Add support for sliderwhistle

This commit is contained in:
smoogipoo
2021-04-08 20:19:41 +09:00
parent 1e23f671fa
commit 7713c8a45f
2 changed files with 10 additions and 3 deletions

View File

@ -81,6 +81,8 @@ namespace osu.Game.Rulesets.Osu.Objects
public List<IList<HitSampleInfo>> NodeSamples { get; set; } = new List<IList<HitSampleInfo>>();
public IList<HitSampleInfo> OriginalSamples { get; private set; }
private int repeatCount;
public int RepeatCount
@ -147,6 +149,7 @@ namespace osu.Game.Rulesets.Osu.Objects
// The samples should be attached to the slider tail, however this can only be done after LegacyLastTick is removed otherwise they would play earlier than they're intended to.
// For now, the samples are attached to and played by the slider itself at the correct end time.
// ToArray call is required as GetNodeSamples may fallback to Samples itself (without it it will get cleared due to the list reference being live).
OriginalSamples = Samples.ToList();
Samples = this.GetNodeSamples(repeatCount + 1).ToArray();
}