mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Use existing bindable flow instead
This commit is contained in:
@ -360,7 +360,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
}
|
||||
|
||||
[Resolved(canBeNull: true)]
|
||||
private ISeekableClock seekableClock { get; set; }
|
||||
private ISamplePlaybackDisabler samplePlaybackDisabler { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Calculate the position to be used for sample playback at a specified X position (0..1).
|
||||
@ -374,18 +374,13 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
return balance_adjust_amount * (userPositionalHitSounds.Value ? position - 0.5f : 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether samples should currently be playing. Will be false during seek operations.
|
||||
/// </summary>
|
||||
protected bool ShouldPlaySamples => seekableClock?.IsSeeking != true;
|
||||
|
||||
/// <summary>
|
||||
/// Plays all the hit sounds for this <see cref="DrawableHitObject"/>.
|
||||
/// This is invoked automatically when this <see cref="DrawableHitObject"/> is hit.
|
||||
/// </summary>
|
||||
public virtual void PlaySamples()
|
||||
{
|
||||
if (Samples != null && ShouldPlaySamples)
|
||||
if (Samples != null)
|
||||
{
|
||||
Samples.Balance.Value = CalculateSamplePlaybackBalance(SamplePlaybackPosition);
|
||||
Samples.Play();
|
||||
|
Reference in New Issue
Block a user