Fix hit samples playing while paused / seeking in the editor

This commit is contained in:
Dean Herbert
2020-09-28 18:16:19 +09:00
parent 2f5a2d3bba
commit 4f0c0ea5f9
5 changed files with 37 additions and 5 deletions

View File

@ -360,7 +360,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
}
[Resolved(canBeNull: true)]
private GameplayClock gameplayClock { get; set; }
private ISeekableClock seekableClock { get; set; }
/// <summary>
/// Calculate the position to be used for sample playback at a specified X position (0..1).
@ -377,7 +377,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// <summary>
/// Whether samples should currently be playing. Will be false during seek operations.
/// </summary>
protected bool ShouldPlaySamples => gameplayClock?.IsSeeking != true;
protected bool ShouldPlaySamples => seekableClock?.IsSeeking != true;
/// <summary>
/// Plays all the hit sounds for this <see cref="DrawableHitObject"/>.