Add sample lifetime constraints for taiko

This commit is contained in:
Bartłomiej Dach
2020-07-26 15:09:12 +02:00
parent c5b3220d8e
commit 648f9204f5
5 changed files with 74 additions and 59 deletions

View File

@ -25,11 +25,11 @@ namespace osu.Game.Rulesets.Taiko.UI
private const float middle_split = 0.025f;
[Cached]
private DrumSampleMapping sampleMapping;
private DrumSampleContainer sampleContainer;
public InputDrum(ControlPointInfo controlPoints)
{
sampleMapping = new DrumSampleMapping(controlPoints);
sampleContainer = new DrumSampleContainer(controlPoints);
RelativeSizeAxes = Axes.Both;
}
@ -69,7 +69,7 @@ namespace osu.Game.Rulesets.Taiko.UI
}
});
AddRangeInternal(sampleMapping.Sounds);
AddRangeInternal(sampleContainer.Sounds);
}
/// <summary>
@ -93,7 +93,7 @@ namespace osu.Game.Rulesets.Taiko.UI
private readonly Sprite centreHit;
[Resolved]
private DrumSampleMapping sampleMappings { get; set; }
private DrumSampleContainer sampleContainer { get; set; }
public TaikoHalfDrum(bool flipped)
{
@ -154,7 +154,7 @@ namespace osu.Game.Rulesets.Taiko.UI
Drawable target = null;
Drawable back = null;
var drumSample = sampleMappings.SampleAt(Time.Current);
var drumSample = sampleContainer.SampleAt(Time.Current);
if (action == CentreAction)
{