Merge branch 'master' into Issue#9170

This commit is contained in:
Dean Herbert
2020-07-28 13:36:42 +09:00
committed by GitHub
114 changed files with 1716 additions and 1030 deletions

View File

@ -22,6 +22,9 @@ namespace osu.Game.Skinning
[Resolved]
private ISampleStore samples { get; set; }
public override bool RemoveWhenNotAlive => false;
public override bool RemoveCompletedTransforms => false;
public SkinnableSound(ISampleInfo hitSamples)
: this(new[] { hitSamples })
{
@ -100,6 +103,8 @@ namespace osu.Game.Skinning
protected override void SkinChanged(ISkinSource skin, bool allowFallback)
{
bool wasPlaying = samplesContainer.Any(s => s.Playing);
var channels = hitSamples.Select(s =>
{
var ch = skin.GetSample(s);
@ -123,6 +128,9 @@ namespace osu.Game.Skinning
}).Where(c => c != null);
samplesContainer.ChildrenEnumerable = channels.Select(c => new DrawableSample(c));
if (wasPlaying)
Play();
}
}
}